Mercurial > projects > ddmd
comparison dmd/AddAssignExp.d @ 12:832f71e6f96c
*Exp and *AssignExp arrayOp implementation added (might be a bit incomplete)
Some unittest-specific functions implemented
author | korDen |
---|---|
date | Mon, 12 Apr 2010 15:13:00 +0400 |
parents | 10317f0c89a5 |
children | cab4c37afb89 |
comparison
equal
deleted
inserted
replaced
11:3356c90e9aac | 12:832f71e6f96c |
---|---|
3 import dmd.BinExp; | 3 import dmd.BinExp; |
4 import dmd.Loc; | 4 import dmd.Loc; |
5 import dmd.Expression; | 5 import dmd.Expression; |
6 import dmd.Scope; | 6 import dmd.Scope; |
7 import dmd.InterState; | 7 import dmd.InterState; |
8 import dmd.Argument; | |
9 import dmd.STC; | |
8 import dmd.OutBuffer; | 10 import dmd.OutBuffer; |
9 import dmd.ArrayTypes; | 11 import dmd.ArrayTypes; |
10 import dmd.Identifier; | 12 import dmd.Identifier; |
11 import dmd.IRState; | 13 import dmd.IRState; |
12 import dmd.TOK; | 14 import dmd.TOK; |
141 assert(false); | 143 assert(false); |
142 } | 144 } |
143 | 145 |
144 void buildArrayIdent(OutBuffer buf, Expressions arguments) | 146 void buildArrayIdent(OutBuffer buf, Expressions arguments) |
145 { | 147 { |
146 assert(false); | 148 AssignExp_buildArrayIdent(buf, arguments, "Add"); |
147 } | 149 } |
148 | 150 |
149 Expression buildArrayLoop(Arguments fparams) | 151 Expression buildArrayLoop(Arguments fparams) |
150 { | 152 { |
151 assert(false); | 153 /* Evaluate assign expressions right to left |
154 */ | |
155 Expression ex2 = e2.buildArrayLoop(fparams); | |
156 Expression ex1 = e1.buildArrayLoop(fparams); | |
157 Argument param = cast(Argument)fparams.data[0]; | |
158 param.storageClass = STCundefined; | |
159 Expression e = new AddAssignExp(Loc(0), ex1, ex2); | |
160 return e; | |
152 } | 161 } |
153 | 162 |
154 Identifier opId() /* For operator overloading */ | 163 Identifier opId() /* For operator overloading */ |
155 { | 164 { |
156 return Id.addass; | 165 return Id.addass; |