Query Context at Source File and Offset in DMD

"Nordlöw" per.nordlow at gmail.com
Sun Apr 6 13:52:05 PDT 2014


> The Lexer's constructor takes a Module as the first parameter 
> [1]. A Module has the original argument name [2], I assume 
> that's the filename. Just store the module/filename as an 
> instance variable in the lexer and access it where you need it.
>
> [1] 
> https://github.com/D-Programming-Language/dmd/blob/master/src/lexer.c#L245
>
> [2] 
> https://github.com/D-Programming-Language/dmd/blob/master/src/module.h#L76

Thx.


More information about the Digitalmars-d-learn mailing list