aboutsummaryrefslogtreecommitdiff
path: root/src/yuescript/yue_parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/yuescript/yue_parser.cpp')
-rw-r--r--src/yuescript/yue_parser.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/yuescript/yue_parser.cpp b/src/yuescript/yue_parser.cpp
index 11c7627..2206686 100644
--- a/src/yuescript/yue_parser.cpp
+++ b/src/yuescript/yue_parser.cpp
@@ -617,11 +617,21 @@ YueParser::YueParser() {
617 617
618 Parens = '(' >> *space_break >> space >> Exp >> *space_break >> space >> ')'; 618 Parens = '(' >> *space_break >> space >> Exp >> *space_break >> space >> ')';
619 Callable = Variable | SelfItem | MacroName | Parens; 619 Callable = Variable | SelfItem | MacroName | Parens;
620 fn_args_exp_list = space >> Exp >> space >> *((line_break | ',') >> white >> Exp); 620
621 fn_args_value_list = Exp >> *(space >> ',' >> space >> Exp);
622
623 fn_args_lit_line = (
624 push_indent_match >> (space >> fn_args_value_list >> pop_indent | pop_indent)
625 ) | (
626 space
627 );
628
629 fn_args_lit_lines = space_break >> fn_args_lit_line >> *(-(space >> ',') >> space_break >> fn_args_lit_line) >> -(space >> ',');
621 630
622 fn_args = 631 fn_args =
623 '(' >> *space_break >> -fn_args_exp_list >> *space_break >> space >> ')' | 632 '(' >> -(space >> fn_args_value_list >> -(space >> ',')) >>
624 space >> '!' >> not_('='); 633 -fn_args_lit_lines >>
634 white >> ')' | space >> '!' >> not_('=');
625 635
626 meta_index = Name | index | String; 636 meta_index = Name | index | String;
627 Metatable = '<' >> space >> '>'; 637 Metatable = '<' >> space >> '>';
@@ -701,7 +711,7 @@ YueParser::YueParser() {
701 table_lit_lines = space_break >> table_lit_line >> *(-(space >> ',') >> space_break >> table_lit_line) >> -(space >> ','); 711 table_lit_lines = space_break >> table_lit_line >> *(-(space >> ',') >> space_break >> table_lit_line) >> -(space >> ',');
702 712
703 TableLit = 713 TableLit =
704 space >> '{' >> Seperator >> 714 '{' >> Seperator >>
705 -(space >> table_value_list >> -(space >> ',')) >> 715 -(space >> table_value_list >> -(space >> ',')) >>
706 -table_lit_lines >> 716 -table_lit_lines >>
707 white >> '}'; 717 white >> '}';