From e958b59c9635f0a01e29e3f30c34adecd327cc1f Mon Sep 17 00:00:00 2001 From: Li Jin Date: Fri, 11 Sep 2020 17:59:53 +0800 Subject: revert binary operator rules, change implicit object start symbol. --- src/MoonP/moon_parser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/MoonP/moon_parser.cpp b/src/MoonP/moon_parser.cpp index 53a6b8f..394ce50 100644 --- a/src/MoonP/moon_parser.cpp +++ b/src/MoonP/moon_parser.cpp @@ -332,7 +332,7 @@ MoonParser::MoonParser() { expr(">>") | expr("//") | set("+-*/%><|&~"); - exp_op_value = (White >> not_(unary_operator) | Space) >> BinaryOperator >> *SpaceBreak >> backcall_exp; + exp_op_value = Space >> BinaryOperator >> *SpaceBreak >> backcall_exp; Exp = Seperator >> backcall_exp >> *exp_op_value; ChainValue = Seperator >> (Chain | Callable) >> -existential_op >> -InvokeArgs; @@ -432,7 +432,7 @@ MoonParser::MoonParser() { TableBlockInner = Seperator >> KeyValueLine >> *(+SpaceBreak >> KeyValueLine); TableBlock = +SpaceBreak >> Advance >> ensure(TableBlockInner, PopIndent); - TableBlockIndent = sym('#') >> Seperator >> KeyValueList >> -sym(',') >> + TableBlockIndent = sym('*') >> Seperator >> KeyValueList >> -sym(',') >> -(+SpaceBreak >> Advance >> ensure(KeyValueList >> -sym(',') >> *(+SpaceBreak >> KeyValueLine), PopIndent)); class_member_list = Seperator >> KeyValue >> *(sym(',') >> KeyValue); -- cgit v1.2.3-55-g6feb