Comment #0 by dlang-bugzilla — 2017-06-25T08:40:50Z
Given a DDoc file:
// test.dd //
Ddoc
$(FOO BAR)
Macros:
BAR=bar
FOO=$($1)
/////////////
DMD will currently emit:
$(BAR)
This result is not what was intended, and not useful.
Allowing specifying and expanding macros by their name via macro parameters would allow using new DDoc patterns, similar to the X macro preprocessor pattern in C.
Example use case:
https://github.com/dlang/dlang.org/pull/1766#discussion_r123892968
Comment #1 by robert.schadek — 2024-12-13T18:52:48Z