Bug 17549 – $($1) should expand to the macro identified by $1

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-06-25T08:40:50Z
Last change time
2024-12-13T18:52:48Z
Keywords
ddoc
Assigned to
No Owner
Creator
Vladimir Panteleev
Moved to GitHub: dmd#19268 →

Comments

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
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19268 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB