Mercurial > projects > ddmd
annotate dmd/UAddExp.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.UAddExp; |
2 | |
114 | 3 import dmd.common; |
72 | 4 import dmd.Expression; |
5 import dmd.Identifier; | |
6 import dmd.UnaExp; | |
7 import dmd.Loc; | |
8 import dmd.Scope; | |
9 import dmd.TOK; | |
123 | 10 import dmd.Id; |
72 | 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 UAddExp : UnaExp |
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 this(Loc loc, Expression e) |
19 { | |
178 | 20 register(); |
72 | 21 super(loc, TOK.TOKuadd, this.sizeof, e); |
22 } | |
23 | |
24 override Expression semantic(Scope sc) | |
25 { | |
26 Expression e; | |
27 | |
28 version (LOGSEMANTIC) { | |
29 printf("UAddExp.semantic('%s')\n", toChars()); | |
30 } | |
31 assert(!type); | |
32 UnaExp.semantic(sc); | |
33 e1 = resolveProperties(sc, e1); | |
34 e = op_overload(sc); | |
35 if (e) | |
36 return e; | |
37 e1.checkNoBool(); | |
38 e1.checkArithmetic(); | |
39 return e1; | |
40 } | |
41 | |
42 override Identifier opId() | |
43 { | |
123 | 44 return Id.uadd; |
72 | 45 } |
46 } |