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.h26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/MoonP/moon_ast.h b/src/MoonP/moon_ast.h
index dd01165..9fab215 100644
--- a/src/MoonP/moon_ast.h
+++ b/src/MoonP/moon_ast.h
@@ -500,18 +500,28 @@ AST_NODE(ClassDecl)
500 AST_MEMBER(ClassDecl, &name, &extend, &body) 500 AST_MEMBER(ClassDecl, &name, &extend, &body)
501AST_END(ClassDecl) 501AST_END(ClassDecl)
502 502
503AST_NODE(export_values) 503AST_NODE(global_values)
504 ast_ptr<true, NameList_t> nameList; 504 ast_ptr<true, NameList_t> nameList;
505 ast_ptr<false, ExpListLow_t> valueList; 505 ast_ptr<false, ExpListLow_t> valueList;
506 AST_MEMBER(export_values, &nameList, &valueList) 506 AST_MEMBER(global_values, &nameList, &valueList)
507AST_END(export_values) 507AST_END(global_values)
508 508
509AST_LEAF(export_op) 509AST_LEAF(global_op)
510AST_END(export_op) 510AST_END(global_op)
511
512AST_NODE(Global)
513 ast_sel<true, ClassDecl_t, global_op_t, global_values_t> item;
514 AST_MEMBER(Global, &item)
515AST_END(Global)
516
517AST_LEAF(export_default)
518AST_END(export_default)
511 519
512AST_NODE(Export) 520AST_NODE(Export)
513 ast_sel<true, ClassDecl_t, export_op_t, export_values_t> item; 521 ast_ptr<false, export_default_t> def;
514 AST_MEMBER(Export, &item) 522 ast_sel<true, ExpList_t, Exp_t> target;
523 ast_ptr<false, Assign_t> assign;
524 AST_MEMBER(Export, &def, &target, &assign)
515AST_END(Export) 525AST_END(Export)
516 526
517AST_NODE(FnArgDef) 527AST_NODE(FnArgDef)
@@ -601,7 +611,7 @@ AST_END(BreakLoop)
601 611
602AST_NODE(Statement) 612AST_NODE(Statement)
603 ast_sel<true, Import_t, While_t, For_t, ForEach_t, 613 ast_sel<true, Import_t, While_t, For_t, ForEach_t,
604 Return_t, Local_t, Export_t, BreakLoop_t, 614 Return_t, Local_t, Global_t, Export_t, BreakLoop_t,
605 Backcall_t, ExpListAssign_t> content; 615 Backcall_t, ExpListAssign_t> content;
606 ast_ptr<false, statement_appendix_t> appendix; 616 ast_ptr<false, statement_appendix_t> appendix;
607 AST_MEMBER(Statement, &content, &appendix) 617 AST_MEMBER(Statement, &content, &appendix)