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