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.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/yuescript/yue_parser.cpp b/src/yuescript/yue_parser.cpp
index e3dc598..a43cdd7 100644
--- a/src/yuescript/yue_parser.cpp
+++ b/src/yuescript/yue_parser.cpp
@@ -909,11 +909,11 @@ YueParser::YueParser() {
909 white >> '}' 909 white >> '}'
910 ); 910 );
911 911
912 table_block_inner = Seperator >> key_value_line >> *(+space_break >> key_value_line); 912 table_block_inner = Seperator >> key_value_line >> *(+(plain_space >> line_break) >> key_value_line);
913 TableBlock = +space_break >> advance_match >> ensure(table_block_inner, pop_indent); 913 TableBlock = +space_break >> advance_match >> ensure(table_block_inner, pop_indent);
914 TableBlockIndent = ('*' | '-' >> space_one) >> Seperator >> disable_arg_table_block_rule( 914 TableBlockIndent = ('*' | '-' >> space_one) >> Seperator >> disable_arg_table_block_rule(
915 space >> key_value_list >> -(space >> ',') >> 915 space >> key_value_list >> -(space >> ',') >>
916 -(+space_break >> advance_match >> space >> ensure(key_value_list >> -(space >> ',') >> *(+space_break >> key_value_line), pop_indent))); 916 -(+(plain_space >> line_break) >> advance_match >> space >> ensure(key_value_list >> -(space >> ',') >> *(+(plain_space >> line_break) >> key_value_line), pop_indent)));
917 917
918 ClassMemberList = Seperator >> key_value >> *(space >> ',' >> space >> key_value); 918 ClassMemberList = Seperator >> key_value >> *(space >> ',' >> space >> key_value);
919 class_line = check_indent_match >> space >> (ClassMemberList | Statement) >> -(space >> ','); 919 class_line = check_indent_match >> space >> (ClassMemberList | Statement) >> -(space >> ',');
@@ -1017,11 +1017,13 @@ YueParser::YueParser() {
1017 MetaVariablePair | 1017 MetaVariablePair |
1018 MetaNormalPair; 1018 MetaNormalPair;
1019 key_value_list = key_value >> *(space >> ',' >> space >> key_value); 1019 key_value_list = key_value >> *(space >> ',' >> space >> key_value);
1020 key_value_line = check_indent_match >> space >> ( 1020 key_value_line =
1021 key_value_list >> -(space >> ',') | 1021 YueComment |
1022 TableBlockIndent | 1022 check_indent_match >> space >> (
1023 ('*' | '-' >> space_one) >> space >> (SpreadExp | Exp | TableBlock) 1023 key_value_list >> -(space >> ',') |
1024 ); 1024 TableBlockIndent |
1025 ('*' | '-' >> space_one) >> space >> (SpreadExp | Exp | TableBlock)
1026 );
1025 1027
1026 fn_arg_def_list = FnArgDef >> *(space >> ',' >> space >> FnArgDef); 1028 fn_arg_def_list = FnArgDef >> *(space >> ',' >> space >> FnArgDef);
1027 1029