aboutsummaryrefslogtreecommitdiff
path: root/src/MoonP/moon_ast.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/MoonP/moon_ast.h')
-rw-r--r--src/MoonP/moon_ast.h33
1 files changed, 21 insertions, 12 deletions
diff --git a/src/MoonP/moon_ast.h b/src/MoonP/moon_ast.h
index 4918a0a..42522dd 100644
--- a/src/MoonP/moon_ast.h
+++ b/src/MoonP/moon_ast.h
@@ -341,8 +341,8 @@ AST_END(Update)
341AST_LEAF(BinaryOperator) 341AST_LEAF(BinaryOperator)
342AST_END(BinaryOperator) 342AST_END(BinaryOperator)
343 343
344AST_LEAF(BackcallOperator) 344AST_LEAF(unary_operator)
345AST_END(BackcallOperator) 345AST_END(unary_operator)
346 346
347class AssignableChain_t; 347class AssignableChain_t;
348 348
@@ -351,18 +351,19 @@ AST_NODE(Assignable)
351 AST_MEMBER(Assignable, &item) 351 AST_MEMBER(Assignable, &item)
352AST_END(Assignable) 352AST_END(Assignable)
353 353
354class Value_t; 354class unary_exp_t;
355 355
356AST_NODE(exp_op_value) 356AST_NODE(exp_op_value)
357 ast_sel<true, BinaryOperator_t, BackcallOperator_t> op; 357 ast_ptr<true, BinaryOperator_t> op;
358 ast_ptr<true, Value_t> value; 358 ast_list<true, unary_exp_t> backcalls;
359 AST_MEMBER(exp_op_value, &op, &value) 359 AST_MEMBER(exp_op_value, &op, &backcalls)
360AST_END(exp_op_value) 360AST_END(exp_op_value)
361 361
362AST_NODE(Exp) 362AST_NODE(Exp)
363 ast_ptr<true, Value_t> value; 363 ast_ptr<true, Seperator_t> sep;
364 ast_list<true, unary_exp_t> backcalls;
364 ast_list<false, exp_op_value_t> opValues; 365 ast_list<false, exp_op_value_t> opValues;
365 AST_MEMBER(Exp, &value, &opValues) 366 AST_MEMBER(Exp, &sep, &backcalls, &opValues)
366AST_END(Exp) 367AST_END(Exp)
367 368
368class Parens_t; 369class Parens_t;
@@ -396,14 +397,15 @@ AST_END(simple_table)
396class String_t; 397class String_t;
397class const_value_t; 398class const_value_t;
398class ClassDecl_t; 399class ClassDecl_t;
399class unary_exp_t; 400class unary_value_t;
400class TableLit_t; 401class TableLit_t;
401class FunLit_t; 402class FunLit_t;
402 403
403AST_NODE(SimpleValue) 404AST_NODE(SimpleValue)
404 ast_sel<true, const_value_t, 405 ast_sel<true, const_value_t,
405 If_t, Unless_t, Switch_t, With_t, ClassDecl_t, 406 If_t, Unless_t, Switch_t, With_t, ClassDecl_t,
406 ForEach_t, For_t, While_t, Do_t, unary_exp_t, 407 ForEach_t, For_t, While_t, Do_t,
408 unary_value_t,
407 TblComprehension_t, TableLit_t, Comprehension_t, 409 TblComprehension_t, TableLit_t, Comprehension_t,
408 FunLit_t, Num_t> value; 410 FunLit_t, Num_t> value;
409 AST_MEMBER(SimpleValue, &value) 411 AST_MEMBER(SimpleValue, &value)
@@ -641,9 +643,16 @@ AST_END(InvokeArgs)
641AST_LEAF(const_value) 643AST_LEAF(const_value)
642AST_END(const_value) 644AST_END(const_value)
643 645
646AST_NODE(unary_value)
647 ast_list<true, unary_operator_t> ops;
648 ast_ptr<true, Value_t> value;
649 AST_MEMBER(unary_value, &ops, &value)
650AST_END(unary_value)
651
644AST_NODE(unary_exp) 652AST_NODE(unary_exp)
645 ast_ptr<true, Exp_t> item; 653 ast_list<false, unary_operator_t> ops;
646 AST_MEMBER(unary_exp, &item) 654 ast_list<true, Value_t> expos;
655 AST_MEMBER(unary_exp, &ops, &expos)
647AST_END(unary_exp) 656AST_END(unary_exp)
648 657
649AST_NODE(ExpListAssign) 658AST_NODE(ExpListAssign)