Subtle bug in ddox vs. ddoc macro handling

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Fri Sep 16 12:11:36 PDT 2016


On Friday, 16 September 2016 at 18:40:03 UTC, Andrei Alexandrescu 
wrote:
> So, I've spent the better part of this morning tracing what 
> seems to be a subtle bug in ddox' macro treatment. I defined 
> these macros:
>
> IGNORESECOND = [$1]
> DOLLARZERO = dzbegin $0 dzend
> TEST = before $(IGNORESECOND $(DOLLARZERO one, two)) after
>
> I inserted $(TEST) in a Phobos module. When processing the 
> module with ddoc, the macro expands to:
>
> before [dzbegin one, two dzend] after
>
> wherease with ddox it expands to:
>
> before [dzbegin one] after
>
> i.e. the comma "escapes" the confines of the macro DOLLARZERO.
>
> The "right" behavior is ddoc's, for several reasons. Is there a 
> distinct macro engine powering ddox generation? Who is 
> maintaining that?
>
>
> Thanks,
>
> Andrei

I belive ddox is maintained by soenke ludwig


More information about the Digitalmars-d mailing list