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.