diff options
Diffstat (limited to 'src/MoonP/moon_ast.h')
-rw-r--r-- | src/MoonP/moon_ast.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/MoonP/moon_ast.h b/src/MoonP/moon_ast.h index 7ef25a9..dd11ac4 100644 --- a/src/MoonP/moon_ast.h +++ b/src/MoonP/moon_ast.h | |||
@@ -190,14 +190,16 @@ AST_NODE(Return) | |||
190 | AST_MEMBER(Return, &valueList) | 190 | AST_MEMBER(Return, &valueList) |
191 | AST_END(Return) | 191 | AST_END(Return) |
192 | 192 | ||
193 | class existential_op_t; | ||
193 | class Assign_t; | 194 | class Assign_t; |
194 | class Body_t; | 195 | class Body_t; |
195 | 196 | ||
196 | AST_NODE(With) | 197 | AST_NODE(With) |
198 | ast_ptr<false, existential_op_t> eop; | ||
197 | ast_ptr<true, ExpList_t> valueList; | 199 | ast_ptr<true, ExpList_t> valueList; |
198 | ast_ptr<false, Assign_t> assigns; | 200 | ast_ptr<false, Assign_t> assigns; |
199 | ast_ptr<true, Body_t> body; | 201 | ast_ptr<true, Body_t> body; |
200 | AST_MEMBER(With, &valueList, &assigns, &body) | 202 | AST_MEMBER(With, &eop, &valueList, &assigns, &body) |
201 | AST_END(With) | 203 | AST_END(With) |
202 | 204 | ||
203 | AST_NODE(SwitchCase) | 205 | AST_NODE(SwitchCase) |
@@ -238,6 +240,12 @@ AST_NODE(While) | |||
238 | AST_MEMBER(While, &condition, &body) | 240 | AST_MEMBER(While, &condition, &body) |
239 | AST_END(While) | 241 | AST_END(While) |
240 | 242 | ||
243 | AST_NODE(Repeat) | ||
244 | ast_ptr<true, Body_t> body; | ||
245 | ast_ptr<true, Exp_t> condition; | ||
246 | AST_MEMBER(Repeat, &body, &condition) | ||
247 | AST_END(Repeat) | ||
248 | |||
241 | AST_NODE(for_step_value) | 249 | AST_NODE(for_step_value) |
242 | ast_ptr<true, Exp_t> value; | 250 | ast_ptr<true, Exp_t> value; |
243 | AST_MEMBER(for_step_value, &value) | 251 | AST_MEMBER(for_step_value, &value) |
@@ -664,7 +672,7 @@ AST_LEAF(BreakLoop) | |||
664 | AST_END(BreakLoop) | 672 | AST_END(BreakLoop) |
665 | 673 | ||
666 | AST_NODE(Statement) | 674 | AST_NODE(Statement) |
667 | ast_sel<true, Import_t, While_t, For_t, ForEach_t, | 675 | ast_sel<true, Import_t, While_t, Repeat_t, For_t, ForEach_t, |
668 | Return_t, Local_t, Global_t, Export_t, Macro_t, BreakLoop_t, | 676 | Return_t, Local_t, Global_t, Export_t, Macro_t, BreakLoop_t, |
669 | Label_t, Goto_t, Backcall_t, ExpListAssign_t> content; | 677 | Label_t, Goto_t, Backcall_t, ExpListAssign_t> content; |
670 | ast_ptr<false, statement_appendix_t> appendix; | 678 | ast_ptr<false, statement_appendix_t> appendix; |