Mercurial > projects > ddmd
annotate dmd/TemplateExp.d @ 192:eb38fdcb3e62 default tip
updated to compile with dmd2.062
author | korDen |
---|---|
date | Sat, 02 Mar 2013 01:25:52 -0800 |
parents | b0d41ff5e0df |
children |
rev | line source |
---|---|
72 | 1 module dmd.TemplateExp; |
2 | |
114 | 3 import dmd.common; |
72 | 4 import dmd.Expression; |
5 import dmd.OutBuffer; | |
6 import dmd.Loc; | |
7 import dmd.HdrGenState; | |
8 import dmd.TemplateDeclaration; | |
9 import dmd.TOK; | |
10 | |
187
b0d41ff5e0df
Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
Abscissa
parents:
178
diff
changeset
|
11 import dmd.DDMDExtensions; |
b0d41ff5e0df
Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
Abscissa
parents:
178
diff
changeset
|
12 |
0 | 13 class TemplateExp : Expression |
14 { | |
187
b0d41ff5e0df
Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
Abscissa
parents:
178
diff
changeset
|
15 mixin insertMemberExtension!(typeof(this)); |
b0d41ff5e0df
Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
Abscissa
parents:
178
diff
changeset
|
16 |
0 | 17 TemplateDeclaration td; |
18 | |
19 this(Loc loc, TemplateDeclaration td) | |
72 | 20 { |
178 | 21 register(); |
0 | 22 super(loc, TOK.TOKtemplate, TemplateExp.sizeof); |
23 //printf("TemplateExp(): %s\n", td.toChars()); | |
24 this.td = td; | |
25 } | |
26 | |
72 | 27 override void rvalue() |
0 | 28 { |
29 error("template %s has no value", toChars()); | |
30 } | |
31 | |
72 | 32 override void toCBuffer(OutBuffer buf, HdrGenState* hgs) |
0 | 33 { |
34 buf.writestring(td.toChars()); | |
35 } | |
36 } | |
37 |