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;
|
|
10
|
|
11 class UAddExp : UnaExp
|
|
12 {
|
|
13 this(Loc loc, Expression e)
|
|
14 {
|
|
15 super(loc, TOK.TOKuadd, this.sizeof, e);
|
|
16 }
|
|
17
|
|
18 override Expression semantic(Scope sc)
|
|
19 {
|
|
20 Expression e;
|
|
21
|
|
22 version (LOGSEMANTIC) {
|
|
23 printf("UAddExp.semantic('%s')\n", toChars());
|
|
24 }
|
|
25 assert(!type);
|
|
26 UnaExp.semantic(sc);
|
|
27 e1 = resolveProperties(sc, e1);
|
|
28 e = op_overload(sc);
|
|
29 if (e)
|
|
30 return e;
|
|
31 e1.checkNoBool();
|
|
32 e1.checkArithmetic();
|
|
33 return e1;
|
|
34 }
|
|
35
|
|
36 override Identifier opId()
|
|
37 {
|
|
38 assert(false);
|
|
39 }
|
|
40 }
|