March 08, 2014
Where should I put logic-and-printfs in DMD to show lexical, syntactic and semantic information about a symbol and/or expression at given position in the source file being parsed.

I'm guessing for some iteration in the lexical, syntactic and semantic passes respectively where I need to check whether my query offset lies inside inside some  context window currently being analyzed by DMD.
March 09, 2014
On 2014-03-09 00:32, "Nordlöw" wrote:
> Where should I put logic-and-printfs in DMD to show lexical, syntactic
> and semantic information about a symbol and/or expression at given
> position in the source file being parsed.
>
> I'm guessing for some iteration in the lexical, syntactic and semantic
> passes respectively where I need to check whether my query offset lies
> inside inside some  context window currently being analyzed by DMD.

The lexer is implemented in lexer.c, the parser in parser.c and the semantics are implemented in the AST within these three functions "semantic", "semantic2" and "semantic3". For more information see:

http://wiki.dlang.org/DMD_Source_Guide

-- 
/Jacob Carlborg