Thread overview | |||||
---|---|---|---|---|---|
|
February 10, 2013 [Issue 9497] New: ddoc: add support for handling undefined macros | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=9497 Summary: ddoc: add support for handling undefined macros Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: andrei@erdani.com --- Comment #0 from Andrei Alexandrescu <andrei@erdani.com> 2013-02-10 14:16:54 PST --- Currently an undefined ddoc macro expands to the empty string. This makes typos in macros and ill-configured builds difficult to debug. Handling undefined macros should be done with a predefined macro DDOC_UNDEFINED_MACRO. If macro XYZ is used as e.g. $(XYZ arg1,arg2) without being defined, it is replaced with $(DDOC_UNDEFINED_MACRO XYZ,arg1,arg2). If in turn DDOC_UNDEFINED_MACRO is undefined, the expansion is the empty string (thus ensuring backward compatibility). This allows users to define useful behaviors, such as: a) replace with a comment: DDOC_UNDEFINED_MACRO=$(DDOC_COMMENT $(DOLLAR)($1 $+)) b) keep verbatim DDOC_UNDEFINED_MACRO=$(DOLLAR)($1 $+) c) keep only the argument text DDOC_UNDEFINED_MACRO=$+ d) replace with a greppable text such that subsequent tools can find all occurrences: DDOC_UNDEFINED_MACRO=ERROR_UNDEFINED_MACRO: "$1" -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
February 10, 2013 [Issue 9497] ddoc: add support for handling undefined macros | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | http://d.puremagic.com/issues/show_bug.cgi?id=9497 Andrei Alexandrescu <andrei@erdani.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |preapproved --- Comment #1 from Andrei Alexandrescu <andrei@erdani.com> 2013-02-10 14:18:23 PST --- https://github.com/D-Programming-Language/dmd/pull/1653 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
February 11, 2013 [Issue 9497] ddoc: add support for handling undefined macros | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | http://d.puremagic.com/issues/show_bug.cgi?id=9497 Andrej Mitrovic <andrej.mitrovich@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull CC| |andrej.mitrovich@gmail.com Severity|normal |enhancement -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation