annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
1 module dmd.CompoundDeclarationStatement;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
2
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
3 import dmd.CompoundStatement;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
4 import dmd.Loc;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
5 import dmd.ArrayTypes;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
6 import dmd.Statement;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
7 import dmd.OutBuffer;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
8 import dmd.HdrGenState;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
9
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
10 class CompoundDeclarationStatement : CompoundStatement
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
11 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
12 this(Loc loc, Statements s)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
13 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
14 super(loc, s);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
15 ///statements = s;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
16 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
17
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
18 Statement syntaxCopy()
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
19 {
51
b7d29f613539 StaticAssertStatement.syntaxCopy
korDen
parents: 0
diff changeset
20 Statements a = new Statements();
b7d29f613539 StaticAssertStatement.syntaxCopy
korDen
parents: 0
diff changeset
21 a.setDim(statements.dim);
b7d29f613539 StaticAssertStatement.syntaxCopy
korDen
parents: 0
diff changeset
22 for (size_t i = 0; i < statements.dim; i++)
b7d29f613539 StaticAssertStatement.syntaxCopy
korDen
parents: 0
diff changeset
23 {
b7d29f613539 StaticAssertStatement.syntaxCopy
korDen
parents: 0
diff changeset
24 Statement s = cast(Statement)statements.data[i];
b7d29f613539 StaticAssertStatement.syntaxCopy
korDen
parents: 0
diff changeset
25 if (s)
b7d29f613539 StaticAssertStatement.syntaxCopy
korDen
parents: 0
diff changeset
26 s = s.syntaxCopy();
b7d29f613539 StaticAssertStatement.syntaxCopy
korDen
parents: 0
diff changeset
27 a.data[i] = cast(void*)s;
b7d29f613539 StaticAssertStatement.syntaxCopy
korDen
parents: 0
diff changeset
28 }
b7d29f613539 StaticAssertStatement.syntaxCopy
korDen
parents: 0
diff changeset
29 CompoundDeclarationStatement cs = new CompoundDeclarationStatement(loc, a);
b7d29f613539 StaticAssertStatement.syntaxCopy
korDen
parents: 0
diff changeset
30 return cs;
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
31 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
32
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
33 void toCBuffer(OutBuffer buf, HdrGenState* hgs)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
34 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
35 assert(false);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
36 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
37 }