72
|
1 module dmd.DotTemplateExp;
|
|
2
|
|
3 import dmd.Expression;
|
|
4 import dmd.UnaExp;
|
|
5 import dmd.OutBuffer;
|
|
6 import dmd.Loc;
|
|
7 import dmd.TOK;
|
|
8 import dmd.PREC;
|
|
9 import dmd.HdrGenState;
|
|
10 import dmd.TemplateDeclaration;
|
|
11
|
|
12 import dmd.expression.Util;
|
|
13
|
|
14 class DotTemplateExp : UnaExp
|
|
15 {
|
|
16 TemplateDeclaration td;
|
|
17
|
|
18 this(Loc loc, Expression e, TemplateDeclaration td)
|
|
19 {
|
|
20 super(loc, TOK.TOKdottd, this.sizeof, e);
|
|
21 this.td = td;
|
|
22 }
|
|
23
|
|
24 override void toCBuffer(OutBuffer buf, HdrGenState* hgs)
|
|
25 {
|
|
26 expToCBuffer(buf, hgs, e1, PREC.PREC_primary);
|
|
27 buf.writeByte('.');
|
|
28 buf.writestring(td.toChars());
|
|
29 }
|
|
30 }
|
|
31
|