-preview switches

H. S. Teoh hsteoh at quickfur.ath.cx
Wed Apr 1 18:37:44 UTC 2020


On Wed, Apr 01, 2020 at 06:12:39PM +0000, Adam D. Ruppe via Digitalmars-d wrote:
> On Wednesday, 1 April 2020 at 18:04:01 UTC, Adam D. Ruppe wrote:
> > This is why I abandoned the approach of using dmd entirely and wrote
> > a separate doc generator with a separate parser.
> 
> Also note:
> 
> http://dpldocs.info/experimental-docs/arsd.simpledisplay.GlobalHotkey.html
> 
> Trying to do that by different builds... how would you know to do
> custom version specifiers? What about `static if` conditions? Just
> showing it is the only sane way I can imagine.

Yeah, the problem with ddoc is that it's tied to what the compiler
actually compiles, so things like version() and static if throw it off
because the compiler prunes entire branches from the AST before
processing it.

When generating docs, in theory *all* ddoc comments should emit output,
and each conditional branch should add to a list of clauses attached to
the ddoc output.  I doubt this is feasible to implement in the current
dmd code, though.


T

-- 
Why are you blatanly misspelling "blatant"? -- Branden Robinson


More information about the Digitalmars-d mailing list