Dlang code mixin output
Dicebot
public at dicebot.lv
Wed Jul 31 06:37:56 PDT 2013
On Wednesday, 31 July 2013 at 13:25:45 UTC, JS wrote:
> On Wednesday, 31 July 2013 at 13:19:46 UTC, dennis luehring
>> >When you do that with nested templates it
>> > creates a huge mess... also errors are useless... as the
>> point to
>> > the mixin string.
There is one idiom for debugging string mixin mess:
098: // pragma(msg, "mixin_id:");
099: // pragma(msg, generated_code);
100: #line 1 "mixin_id"
101: mixin(generated_code)
102: #line 103 __FILE__
Not very convenient, but enough to get the job done.
Sonke had nice idea to improve compiler by storing mixin id as
part of filename an preserving line numbers as-is. Somewhat
breaking change though.
More information about the Digitalmars-d
mailing list