Mercurial > projects > ddmd
annotate dmd/AndAssignExp.d @ 114:e28b18c23469
added a module dmd.common for commonly used stuff
it currently holds code for consistency checking of predefined versions
also added a VisualD project file
author | Trass3r |
---|---|
date | Wed, 01 Sep 2010 18:21:58 +0200 |
parents | 2e2a5c3f943a |
children | fe941d774f4a |
rev | line source |
---|---|
0 | 1 module dmd.AndAssignExp; |
2 | |
114 | 3 import dmd.common; |
0 | 4 import dmd.BinExp; |
5 import dmd.Loc; | |
6 import dmd.Expression; | |
7 import dmd.Scope; | |
8 import dmd.InterState; | |
9 import dmd.OutBuffer; | |
10 import dmd.ArrayTypes; | |
11 import dmd.Identifier; | |
12 import dmd.IRState; | |
13 import dmd.TOK; | |
14 import dmd.Id; | |
15 | |
16 import dmd.backend.elem; | |
17 import dmd.backend.OPER; | |
18 | |
19 class AndAssignExp : BinExp | |
20 { | |
21 this(Loc loc, Expression e1, Expression e2) | |
22 { | |
23 super(loc, TOK.TOKandass, AndAssignExp.sizeof, e1, e2); | |
24 } | |
25 | |
72 | 26 override Expression semantic(Scope sc) |
0 | 27 { |
28 return commonSemanticAssignIntegral(sc); | |
29 } | |
30 | |
72 | 31 override Expression interpret(InterState istate) |
0 | 32 { |
33 assert(false); | |
34 } | |
35 | |
72 | 36 override void buildArrayIdent(OutBuffer buf, Expressions arguments) |
0 | 37 { |
12
832f71e6f96c
*Exp and *AssignExp arrayOp implementation added (might be a bit incomplete)
korDen
parents:
0
diff
changeset
|
38 AssignExp_buildArrayIdent(buf, arguments, "And"); |
0 | 39 } |
40 | |
72 | 41 override Expression buildArrayLoop(Arguments fparams) |
0 | 42 { |
43 assert(false); | |
44 } | |
45 | |
72 | 46 override Identifier opId() /* For operator overloading */ |
0 | 47 { |
48 return Id.andass; | |
49 } | |
50 | |
72 | 51 override elem* toElem(IRState* irs) |
0 | 52 { |
53 return toElemBin(irs, OPER.OPandass); | |
54 } | |
72 | 55 } |