diff dmd/CompoundDeclarationStatement.d @ 51:b7d29f613539

StaticAssertStatement.syntaxCopy IfStatement.syntaxCopy CompoundDeclarationStatement.syntaxCopy VoidInitializer.syntaxCopy TypeAArray.syntaxCopy TypeTypeof.syntaxCopy TypeAArray.resolve TypeSArray.deduceType TypeAArray.deduceType TypeAArray.implicitConvTo TemplateDeclaration.leastAsSpecialized TemplateTypeParameter.dummyArg TypeIdentifier.deduceType TemplateTypeParameter.syntaxCopy Lexer.hexStringConstant Lexer.delimitedStringConstant GotoDefaultStatement.ctor CaseRangeStatement.ctor Type.castMod StorageClassDeclaration.syntaxCopy TemplateDeclaration.syntaxCopy
author korDen
date Sat, 21 Aug 2010 11:17:42 +0400
parents 10317f0c89a5
children 2e2a5c3f943a
line wrap: on
line diff
--- a/dmd/CompoundDeclarationStatement.d	Sat Aug 21 10:38:26 2010 +0400
+++ b/dmd/CompoundDeclarationStatement.d	Sat Aug 21 11:17:42 2010 +0400
@@ -17,7 +17,17 @@
 	
     Statement syntaxCopy()
 	{
-		assert(false);
+		Statements a = new Statements();
+		a.setDim(statements.dim);
+		for (size_t i = 0; i < statements.dim; i++)
+		{	
+			Statement s = cast(Statement)statements.data[i];
+			if (s)
+				s = s.syntaxCopy();
+			a.data[i] = cast(void*)s;
+		}
+		CompoundDeclarationStatement cs = new CompoundDeclarationStatement(loc, a);
+		return cs;
 	}
 	
     void toCBuffer(OutBuffer buf, HdrGenState* hgs)