0
|
1 module dmd.CompoundDeclarationStatement;
|
|
2
|
|
3 import dmd.CompoundStatement;
|
|
4 import dmd.Loc;
|
|
5 import dmd.ArrayTypes;
|
|
6 import dmd.Statement;
|
|
7 import dmd.OutBuffer;
|
|
8 import dmd.HdrGenState;
|
|
9
|
|
10 class CompoundDeclarationStatement : CompoundStatement
|
|
11 {
|
|
12 this(Loc loc, Statements s)
|
|
13 {
|
|
14 super(loc, s);
|
|
15 ///statements = s;
|
|
16 }
|
|
17
|
72
|
18 override Statement syntaxCopy()
|
0
|
19 {
|
51
|
20 Statements a = new Statements();
|
|
21 a.setDim(statements.dim);
|
|
22 for (size_t i = 0; i < statements.dim; i++)
|
|
23 {
|
|
24 Statement s = cast(Statement)statements.data[i];
|
|
25 if (s)
|
|
26 s = s.syntaxCopy();
|
|
27 a.data[i] = cast(void*)s;
|
|
28 }
|
|
29 CompoundDeclarationStatement cs = new CompoundDeclarationStatement(loc, a);
|
|
30 return cs;
|
0
|
31 }
|
|
32
|
72
|
33 override void toCBuffer(OutBuffer buf, HdrGenState* hgs)
|
0
|
34 {
|
|
35 assert(false);
|
|
36 }
|
72
|
37 }
|