comparison dmd/ClassDeclaration.d @ 53:a8b50ff7f201

ForeachStatement.syntaxCopy SliceExp.syntaxCopy AnonDeclaration.syntaxCopy SwitchStatement.syntaxCopy CaseStatement.syntaxCopy BreakStatement.syntaxCopy ThrowStatement.syntaxCopy NewExp.syntaxCopy DefaultStatement.syntaxCopy AssertExp.syntaxCopy ClassDeclaration.syntaxCopy TypeTypedef.constConv eval_builtin ComplexExp.isConst DVCondition.syntaxCopy OrExp.getIntRange AndExp.getIntRange getMask IntegerExp.getIntRange Type.sizemask CastExp.getIntRange Expression.getIntRange
author korDen
date Sat, 21 Aug 2010 12:15:47 +0400
parents 460959608115
children 2e2a5c3f943a
comparison
equal deleted inserted replaced
52:69d078c417c6 53:a8b50ff7f201
281 inuse = 0; 281 inuse = 0;
282 } 282 }
283 283
284 Dsymbol syntaxCopy(Dsymbol s) 284 Dsymbol syntaxCopy(Dsymbol s)
285 { 285 {
286 assert(false); 286 ClassDeclaration cd;
287
288 //printf("ClassDeclaration.syntaxCopy('%s')\n", toChars());
289 if (s)
290 cd = cast(ClassDeclaration)s;
291 else
292 cd = new ClassDeclaration(loc, ident, null);
293
294 cd.storage_class |= storage_class;
295
296 cd.baseclasses.setDim(this.baseclasses.dim);
297 for (int i = 0; i < cd.baseclasses.dim; i++)
298 {
299 BaseClass b = cast(BaseClass)this.baseclasses.data[i];
300 BaseClass b2 = new BaseClass(b.type.syntaxCopy(), b.protection);
301 cd.baseclasses.data[i] = cast(void*)b2;
302 }
303
304 ScopeDsymbol.syntaxCopy(cd);
305 return cd;
287 } 306 }
288 307
289 void semantic(Scope sc) 308 void semantic(Scope sc)
290 { 309 {
291 int i; 310 int i;