Thread overview
[dmd-internals] Dot*Exp classes?
Feb 09, 2010
Trass3r
Feb 09, 2010
Don Clugston
Feb 09, 2010
Trass3r
Feb 09, 2010
Don Clugston
Feb 09, 2010
Walter Bright
February 09, 2010
I still don't really get what those classes are for.
Are there any information about them?

February 09, 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.
February 09, 2010
> 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.
>
> 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.
>

Ok thanks for your answer.

> alias int quatsch; // quatsch is a type

offtopic: how is it you're using "quatsch"? It's a German word meaning nonsense :)
February 09, 2010

Don Clugston wrote:
> 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.
> 

No, the nature of the symbol after the dot.

February 09, 2010
On 9 February 2010 23:35, Trass3r <mrmocool at gmx.de> wrote:
>> alias int quatsch; // quatsch is a type
>
> offtopic: how is it you're using "quatsch"? It's a German word meaning nonsense :)

Manchmal hat Deutsch besserer W?rter als Englisch. Ich finde 'foo' langweilig.