From 05ef9bb1ffefbc717f3fb4738f3683b3cb09a82e Mon Sep 17 00:00:00 2001 From: Li Jin Date: Fri, 17 Dec 2021 17:33:38 +0800 Subject: eliminate some ambiguous syntax. --- src/yuescript/yue_compiler.cpp | 2 +- src/yuescript/yue_parser.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/yuescript/yue_compiler.cpp b/src/yuescript/yue_compiler.cpp index 15a785a..6295eb7 100755 --- a/src/yuescript/yue_compiler.cpp +++ b/src/yuescript/yue_compiler.cpp @@ -60,7 +60,7 @@ using namespace parserlib; typedef std::list str_list; -const std::string_view version = "0.9.4"sv; +const std::string_view version = "0.9.5"sv; const std::string_view extension = "yue"sv; class YueCompilerImpl { diff --git a/src/yuescript/yue_parser.cpp b/src/yuescript/yue_parser.cpp index 9257fab..03639c3 100755 --- a/src/yuescript/yue_parser.cpp +++ b/src/yuescript/yue_parser.cpp @@ -236,7 +236,7 @@ YueParser::YueParser() { Switch = Space >> key("switch") >> disable_do(Exp) >> -(Space >> key("do")) >> -Space >> Break >> SwitchBlock; - IfCond = disable_chain(Exp >> -Assign); + IfCond = disable_do_chain(disable_arg_table_block(Exp >> -Assign)); IfElseIf = -(Break >> *EmptyLine >> CheckIndent) >> Space >> key("elseif") >> IfCond >> plain_body_with("then"); IfElse = -(Break >> *EmptyLine >> CheckIndent) >> Space >> key("else") >> plain_body; IfType = (expr("if") | expr("unless")) >> not_(AlphaNum); -- cgit v1.2.3-55-g6feb