comparison dmd/TemplateExp.d @ 0:10317f0c89a5

Initial commit
author korDen
date Sat, 24 Oct 2009 08:42:06 +0400
parents
children 2e2a5c3f943a
comparison
equal deleted inserted replaced
-1:000000000000 0:10317f0c89a5
1 module dmd.TemplateExp;
2
3 import dmd.Expression;
4 import dmd.OutBuffer;
5 import dmd.Loc;
6 import dmd.HdrGenState;
7 import dmd.TemplateDeclaration;
8 import dmd.TOK;
9
10 class TemplateExp : Expression
11 {
12 TemplateDeclaration td;
13
14 this(Loc loc, TemplateDeclaration td)
15 {
16 super(loc, TOK.TOKtemplate, TemplateExp.sizeof);
17 //printf("TemplateExp(): %s\n", td.toChars());
18 this.td = td;
19 }
20
21 void rvalue()
22 {
23 error("template %s has no value", toChars());
24 }
25
26 void toCBuffer(OutBuffer buf, HdrGenState* hgs)
27 {
28 buf.writestring(td.toChars());
29 }
30 }
31