Re: Generate documentation from ddoc

2024-12-07 Thread Bradley Chatha via Digitalmars-d-learn
On Friday, 6 December 2024 at 23:57:01 UTC, Mike Shah wrote: Near, thanks for sharing this! I see you're using DMD as a library for this! Yeah it was definitely a little obtuse trying to figure out how to get everything working, but it works kinda well in the end! Tons of work left before I'

Re: Generate documentation from ddoc

2024-12-06 Thread Mike Shah via Digitalmars-d-learn
On Friday, 6 December 2024 at 23:57:01 UTC, Mike Shah wrote: On Friday, 6 December 2024 at 23:06:40 UTC, Bradley Chatha wrote: On Friday, 6 December 2024 at 21:51:28 UTC, Mike Shah wrote: ... It's half baked from a UX perspective, but I have a WIP tool for this since I got annoyed at having

Re: Generate documentation from ddoc

2024-12-06 Thread Mike Shah via Digitalmars-d-learn
On Friday, 6 December 2024 at 23:06:40 UTC, Bradley Chatha wrote: On Friday, 6 December 2024 at 21:51:28 UTC, Mike Shah wrote: ... It's half baked from a UX perspective, but I have a WIP tool for this since I got annoyed at having to have a fully compiling setup just to get docs as well: ht

Re: Generate documentation from ddoc

2024-12-06 Thread Bradley Chatha via Digitalmars-d-learn
On Friday, 6 December 2024 at 21:51:28 UTC, Mike Shah wrote: ... It's half baked from a UX perspective, but I have a WIP tool for this since I got annoyed at having to have a fully compiling setup just to get docs as well: https://github.com/Juptune/marmos There's a demo repo here with a sc

Re: Generate documentation from ddoc

2024-12-06 Thread Mike Shah via Digitalmars-d-learn
On Friday, 6 December 2024 at 20:53:29 UTC, Richard (Rikki) Andrew Cattermole wrote: Looks like you'll need to use dmd as a library and run the ddoc generator manually. Here is where its being called from: https://github.com/dlang/dmd/blob/master/compiler/src/dmd/main.d#L682 My only concern i

Re: Generate documentation from ddoc

2024-12-06 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
Looks like you'll need to use dmd as a library and run the ddoc generator manually. Here is where its being called from: https://github.com/dlang/dmd/blob/master/compiler/src/dmd/main.d#L682 My only concern is its running after semantic analysis. I don't know how good the output will be witho

Generate documentation from ddoc

2024-12-06 Thread Mike Shah via Digitalmars-d-learn
Hello, tl;dr -- Do I need to write my own parser for documentation, or can ddoc be run on individual files without having to resolve all imports? --- ## A few notes on documentation generation with dmd and gdc Given this hello world program: ``` import std.stdio; void main(){ writeln(