aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2023-07-20 18:36:46 +0800
committerLi Jin <dragon-fly@qq.com>2023-07-20 18:36:46 +0800
commit00c4bee811b3c92d9885959db30790b01f8cb3e2 (patch)
tree70511888ef373c3830eb633314d263992d2da3d4
parentfcb480618f162817572947cfed96b1ba0d6c5a44 (diff)
downloadyuescript-00c4bee811b3c92d9885959db30790b01f8cb3e2.tar.gz
yuescript-00c4bee811b3c92d9885959db30790b01f8cb3e2.tar.bz2
yuescript-00c4bee811b3c92d9885959db30790b01f8cb3e2.zip
cleanup error message.
-rw-r--r--src/yuescript/yue_parser.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/yuescript/yue_parser.cpp b/src/yuescript/yue_parser.cpp
index f9dc33a..693a3bc 100644
--- a/src/yuescript/yue_parser.cpp
+++ b/src/yuescript/yue_parser.cpp
@@ -104,7 +104,7 @@ YueParser::YueParser() {
104 }); 104 });
105 105
106 confusing_unary_not_error = pl::user(true_(), [](const item_t& item) { 106 confusing_unary_not_error = pl::user(true_(), [](const item_t& item) {
107 throw ParserError("deprecated unary operator not"sv, item.begin); 107 throw ParserError("deprecated use for unary operator 'not' to be here"sv, item.begin);
108 return false; 108 return false;
109 }); 109 });
110 110
@@ -469,7 +469,7 @@ YueParser::YueParser() {
469 NotIn = true_(); 469 NotIn = true_();
470 InRange = ('(' >> InRangeOpen | '[' >> InRangeClose) >> space >> Exp >> space >> ',' >> space >> Exp >> space >> (')' >> InRangeOpen | ']' >> InRangeClose); 470 InRange = ('(' >> InRangeOpen | '[' >> InRangeClose) >> space >> Exp >> space >> ',' >> space >> Exp >> space >> (')' >> InRangeOpen | ']' >> InRangeClose);
471 InDiscrete = '{' >> Seperator >> space >> exp_not_tab >> *(space >> ',' >> space >> exp_not_tab) >> space >> '}'; 471 InDiscrete = '{' >> Seperator >> space >> exp_not_tab >> *(space >> ',' >> space >> exp_not_tab) >> space >> '}';
472 In = -(key("not") >> NotIn >> space) >> key("in") >> space >> (InRange | InDiscrete | key("not") >> confusing_unary_not_error | Exp); 472 In = -(key("not") >> NotIn >> space) >> key("in") >> space >> (InRange | InDiscrete | and_(key("not")) >> confusing_unary_not_error | Exp);
473 473
474 UnaryOperator = 474 UnaryOperator =
475 '-' >> not_(set(">=") | space_one) | 475 '-' >> not_(set(">=") | space_one) |