[dmd-internals] Dot*Exp classes?

Don Clugston dclugston at googlemail.com
Tue Feb 9 13:47:48 PST 2010


On 9 February 2010 22:30, Trass3r <mrmocool at gmx.de> wrote:
> I still don't really get what those classes are for.
> Are there any information about them?

It's for dealing with qualified names, ie names with dots in them.
They specify the nature of the symbol which is before the dot.

TFoo.bar
where TFoo is a template --> DotTemplateExp(loc, bar, TFoo).

Vfoo.bar
where Vfoo is a variable --> DotVarExp(loc, bar, Vfoo)

alias int quatsch; // quatsch is a type
quatsch.max --> DotTypeExp(loc, Id::max, quatsch);


If you look at parse.c, you can see how they are created. I recommend
looking at lexer.h and parse.c before trying to understand the rest of
the compiler.


More information about the dmd-internals mailing list