comparison dmd/CatExp.d @ 63:cab4c37afb89

A bunch of implementations
author korDen
date Mon, 23 Aug 2010 16:52:24 +0400
parents 10317f0c89a5
children 2e2a5c3f943a
comparison
equal deleted inserted replaced
62:6557375aff35 63:cab4c37afb89
151 e = this; 151 e = this;
152 152
153 return e; 153 return e;
154 } 154 }
155 155
156 Expression interpret(InterState* istate) 156 Expression interpret(InterState istate)
157 { 157 {
158 assert(false); 158 Expression e;
159 Expression e1;
160 Expression e2;
161
162 version (LOG) {
163 printf("CatExp.interpret() %.*s\n", toChars());
164 }
165 e1 = this.e1.interpret(istate);
166 if (e1 is EXP_CANT_INTERPRET)
167 {
168 goto Lcant;
169 }
170 e2 = this.e2.interpret(istate);
171 if (e2 is EXP_CANT_INTERPRET)
172 goto Lcant;
173 return Cat(type, e1, e2);
174
175 Lcant:
176 version (LOG) {
177 printf("CatExp.interpret() %.*s CANT\n", toChars());
178 }
179 return EXP_CANT_INTERPRET;
159 } 180 }
160 181
161 Identifier opId() 182 Identifier opId()
162 { 183 {
163 return Id.cat; 184 return Id.cat;