Mercurial > projects > ddmd
annotate dmd/DefaultInitExp.d @ 187:b0d41ff5e0df
Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
author | Abscissa |
---|---|
date | Tue, 07 Jun 2011 23:37:34 -0400 |
parents | e3afd1303184 |
children |
rev | line source |
---|---|
72 | 1 module dmd.DefaultInitExp; |
2 | |
114 | 3 import dmd.common; |
72 | 4 import dmd.Expression; |
5 import dmd.OutBuffer; | |
6 import dmd.Loc; | |
7 import dmd.Scope; | |
8 import dmd.HdrGenState; | |
9 import dmd.TOK; | |
10 import dmd.Token; | |
11 | |
187
b0d41ff5e0df
Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
Abscissa
parents:
178
diff
changeset
|
12 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
|
13 |
72 | 14 class DefaultInitExp : Expression |
15 { | |
187
b0d41ff5e0df
Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
Abscissa
parents:
178
diff
changeset
|
16 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
|
17 |
72 | 18 TOK subop; |
19 | |
20 this(Loc loc, TOK subop, int size) | |
21 { | |
178 | 22 register(); |
72 | 23 super(loc, TOKdefault, size); |
24 this.subop = subop; | |
25 } | |
26 | |
27 override void toCBuffer(OutBuffer buf, HdrGenState* hgs) | |
28 { | |
29 buf.writestring(Token.toChars(subop)); | |
30 } | |
31 } |