102
|
1 /++
|
|
2 Author: Aziz Köksal
|
|
3 License: GPL2
|
|
4 +/
|
|
5 module Statements;
|
162
|
6 import Expressions;
|
|
7 import Types;
|
102
|
8
|
|
9 class Statement
|
|
10 {
|
|
11
|
|
12 }
|
161
|
13
|
|
14 class Statements : Statement
|
|
15 {
|
|
16 Statement[] ss;
|
|
17 void opCatAssign(Statement s)
|
|
18 {
|
|
19 this.ss ~= s;
|
|
20 }
|
|
21 }
|
|
22
|
162
|
23 class ScopeStatement : Statement
|
|
24 {
|
|
25 Statement s;
|
|
26 this(Statement s)
|
|
27 {
|
|
28 this.s = s;
|
|
29 }
|
|
30 }
|
|
31
|
161
|
32 class LabeledStatement : Statement
|
|
33 {
|
|
34 string label;
|
|
35 Statement s;
|
|
36 this(string label, Statement s)
|
|
37 {
|
|
38 this.label = label;
|
|
39 this.s = s;
|
|
40 }
|
|
41 }
|
|
42
|
|
43 class ExpressionStatement : Statement
|
|
44 {
|
|
45
|
|
46 }
|
|
47
|
|
48 class DeclarationStatement : Statement
|
|
49 {
|
|
50
|
|
51 }
|
|
52
|
|
53 class IfStatement : Statement
|
|
54 {
|
162
|
55 Type type;
|
|
56 string ident;
|
|
57 Expression condition;
|
|
58 Statement ifBody;
|
|
59 Statement elseBody;
|
|
60 this(Type type, string ident, Expression condition, Statement ifBody, Statement elseBody)
|
|
61 {
|
|
62 this.type = type;
|
|
63 this.ident = ident;
|
|
64 this.condition = condition;
|
|
65 this.ifBody = ifBody;
|
|
66 this.elseBody = elseBody;
|
|
67 }
|
161
|
68 }
|
|
69
|
|
70 class ConditionalStatement : Statement
|
|
71 {
|
|
72
|
|
73 }
|
|
74
|
|
75 class WhileStatement : Statement
|
|
76 {
|
164
|
77 Expression condition;
|
|
78 Statement whileBody;
|
|
79 this(Expression condition, Statement whileBody)
|
|
80 {
|
|
81 this.condition = condition;
|
|
82 this.whileBody = whileBody;
|
|
83 }
|
161
|
84 }
|
|
85
|
165
|
86 class DoWhileStatement : Statement
|
161
|
87 {
|
165
|
88 Expression condition;
|
|
89 Statement doBody;
|
|
90 this(Expression condition, Statement doBody)
|
|
91 {
|
|
92 this.condition = condition;
|
|
93 this.doBody = doBody;
|
|
94 }
|
161
|
95 }
|
|
96
|
|
97 class ForStatement : Statement
|
|
98 {
|
|
99
|
|
100 }
|
|
101
|
|
102 class ForeachStatement : Statement
|
|
103 {
|
|
104
|
|
105 }
|
|
106
|
|
107 class SwitchStatement : Statement
|
|
108 {
|
|
109
|
|
110 }
|
|
111
|
|
112 class CaseStatement : Statement
|
|
113 {
|
|
114
|
|
115 }
|
|
116
|
|
117 class DefaultStatement : Statement
|
|
118 {
|
|
119
|
|
120 }
|
|
121
|
|
122 class ContinueStatement : Statement
|
|
123 {
|
|
124
|
|
125 }
|
|
126
|
|
127 class BreakStatement : Statement
|
|
128 {
|
|
129
|
|
130 }
|
|
131
|
|
132 class ReturnStatement : Statement
|
|
133 {
|
|
134
|
|
135 }
|
|
136
|
|
137 class GotoStatement : Statement
|
|
138 {
|
|
139
|
|
140 }
|
|
141
|
|
142 class WithStatement : Statement
|
|
143 {
|
|
144
|
|
145 }
|
|
146
|
|
147 class SynchronizedStatement : Statement
|
|
148 {
|
|
149
|
|
150 }
|
|
151
|
|
152 class TryStatement : Statement
|
|
153 {
|
|
154
|
|
155 }
|
|
156
|
|
157 class ScopeGuardStatement : Statement
|
|
158 {
|
|
159
|
|
160 }
|
|
161
|
|
162 class ThrowStatement : Statement
|
|
163 {
|
|
164
|
|
165 }
|
|
166
|
|
167 class VolatileStatement : Statement
|
|
168 {
|
|
169
|
|
170 }
|
|
171
|
|
172 class AsmStatement : Statement
|
|
173 {
|
|
174
|
|
175 }
|
|
176
|
|
177 class PragmaStatement : Statement
|
|
178 {
|
|
179
|
|
180 }
|
|
181
|
|
182 class MixinStatement : Statement
|
|
183 {
|
|
184
|
|
185 }
|