[Issue 9640] New: Add #line overload to restore natural line numbering / module name
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Mar 3 05:46:18 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9640
Summary: Add #line overload to restore natural line numbering /
module name
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: minor
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: m.strashun at gmail.com
--- Comment #0 from Dicebot <m.strashun at gmail.com> 2013-03-03 05:46:16 PST ---
#line is a pretty convenient tool to get better errors from string mixin's.
Typical code that uses it looks like this:
---
100 #line 1 "mixin name"
101 mixin(generateSomeBigCode());
102 #line 102 "module name"
---
It works, but every time some new code is added above, line numbering will
break again and there is no way to verify this from compiler. I suggest to add
parameter-less #line that will restore natural line order and module name.
Something like this:
---
100 #line 1 "mixin name"
101 mixin(generateSomeBigCode());
102 #line
---
That will help quite a lot in generic code maintenance.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list