diff options
Diffstat (limited to 'src/MoonP/moon_ast.h')
-rw-r--r-- | src/MoonP/moon_ast.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/MoonP/moon_ast.h b/src/MoonP/moon_ast.h index e71afe9..6969688 100644 --- a/src/MoonP/moon_ast.h +++ b/src/MoonP/moon_ast.h | |||
@@ -135,6 +135,15 @@ AST_NODE(Import, "Import"_id) | |||
135 | AST_MEMBER(Import, &content) | 135 | AST_MEMBER(Import, &content) |
136 | AST_END(Import) | 136 | AST_END(Import) |
137 | 137 | ||
138 | class FnArgsDef_t; | ||
139 | class ChainValue_t; | ||
140 | |||
141 | AST_NODE(Backcall, "Backcall"_id) | ||
142 | ast_ptr<false, FnArgsDef_t> argsDef; | ||
143 | ast_ptr<true, ChainValue_t> value; | ||
144 | AST_MEMBER(Backcall, &argsDef, &value) | ||
145 | AST_END(Backcall) | ||
146 | |||
138 | AST_NODE(ExpListLow, "ExpListLow"_id) | 147 | AST_NODE(ExpListLow, "ExpListLow"_id) |
139 | ast_ptr<true, Seperator_t> sep; | 148 | ast_ptr<true, Seperator_t> sep; |
140 | ast_list<true, Exp_t> exprs; | 149 | ast_list<true, Exp_t> exprs; |
@@ -295,6 +304,9 @@ AST_END(Update) | |||
295 | AST_LEAF(BinaryOperator, "BinaryOperator"_id) | 304 | AST_LEAF(BinaryOperator, "BinaryOperator"_id) |
296 | AST_END(BinaryOperator) | 305 | AST_END(BinaryOperator) |
297 | 306 | ||
307 | AST_LEAF(BackcallOperator, "BackcallOperator"_id) | ||
308 | AST_END(BackcallOperator) | ||
309 | |||
298 | class AssignableChain_t; | 310 | class AssignableChain_t; |
299 | 311 | ||
300 | AST_NODE(Assignable, "Assignable"_id) | 312 | AST_NODE(Assignable, "Assignable"_id) |
@@ -305,7 +317,7 @@ AST_END(Assignable) | |||
305 | class Value_t; | 317 | class Value_t; |
306 | 318 | ||
307 | AST_NODE(exp_op_value, "exp_op_value"_id) | 319 | AST_NODE(exp_op_value, "exp_op_value"_id) |
308 | ast_ptr<true, BinaryOperator_t> op; | 320 | ast_sel<true, BinaryOperator_t, BackcallOperator_t> op; |
309 | ast_ptr<true, Value_t> value; | 321 | ast_ptr<true, Value_t> value; |
310 | AST_MEMBER(exp_op_value, &op, &value) | 322 | AST_MEMBER(exp_op_value, &op, &value) |
311 | AST_END(exp_op_value) | 323 | AST_END(exp_op_value) |
@@ -586,7 +598,7 @@ AST_END(BreakLoop) | |||
586 | AST_NODE(Statement, "Statement"_id) | 598 | AST_NODE(Statement, "Statement"_id) |
587 | ast_sel<true, Import_t, While_t, For_t, ForEach_t, | 599 | ast_sel<true, Import_t, While_t, For_t, ForEach_t, |
588 | Return_t, Local_t, Export_t, BreakLoop_t, | 600 | Return_t, Local_t, Export_t, BreakLoop_t, |
589 | ExpListAssign_t> content; | 601 | Backcall_t, ExpListAssign_t> content; |
590 | ast_ptr<false, statement_appendix_t> appendix; | 602 | ast_ptr<false, statement_appendix_t> appendix; |
591 | AST_MEMBER(Statement, &content, &appendix) | 603 | AST_MEMBER(Statement, &content, &appendix) |
592 | AST_END(Statement) | 604 | AST_END(Statement) |