From 95fd6ea93c2af6fb1707e480669d84ebe37fccbe Mon Sep 17 00:00:00 2001 From: Li Jin Date: Mon, 7 Nov 2022 18:26:03 +0800 Subject: fix issue #91. --- src/yuescript/yue_parser.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/yuescript/yue_parser.cpp b/src/yuescript/yue_parser.cpp index b134ee2..4aeb79a 100644 --- a/src/yuescript/yue_parser.cpp +++ b/src/yuescript/yue_parser.cpp @@ -634,7 +634,11 @@ YueParser::YueParser() { not_(set("-~")) >> Seperator >> ( (Exp >> *(sym(',') >> Exp) >> -invoke_args_with_table) | - arg_table_block + arg_table_block | + pl::user(+space_one >> expr('(') >> Exp >> +(sym(',') >> Exp) >> sym(')'), [](const item_t& item) { + throw ParserError("write invoke arguments in parentheses without spaces or space seperated without parentheses", *item.begin, *item.end); + return false; + }) ); const_value = (expr("nil") | expr("true") | expr("false")) >> not_(AlphaNum); -- cgit v1.2.3-55-g6feb