aboutsummaryrefslogtreecommitdiff
path: root/src/parser.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2020-01-16 10:00:14 +0000
committergingerBill <bill@gingerbill.org>2020-01-16 10:00:14 +0000
commit159150c6d9a7d421c0d58bd582847104799606d4 (patch)
treef3e3b9b6763feba9ea24b2b5cfe2016927c8f53f /src/parser.cpp
parent527b39ce2b6cd9ef20af7a04c81017af809c2cdb (diff)
Allow not_in as keyword over notin, but still allow notin to work
Diffstat (limited to 'src/parser.cpp')
-rw-r--r--src/parser.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parser.cpp b/src/parser.cpp
index 5ba18d4a1..ecb02c803 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -1196,7 +1196,7 @@ bool is_token_range(Token tok) {
Token expect_operator(AstFile *f) {
Token prev = f->curr_token;
- if ((prev.kind == Token_in || prev.kind == Token_notin) && (f->expr_level >= 0 || f->allow_in_expr)) {
+ if ((prev.kind == Token_in || prev.kind == Token_not_in) && (f->expr_level >= 0 || f->allow_in_expr)) {
// okay
} else if (!gb_is_between(prev.kind, Token__OperatorBegin+1, Token__OperatorEnd-1)) {
syntax_error(f->curr_token, "Expected an operator, got '%.*s'",
@@ -2515,7 +2515,7 @@ i32 token_precedence(AstFile *f, TokenKind t) {
return 5;
case Token_in:
- case Token_notin:
+ case Token_not_in:
if (f->expr_level < 0 && !f->allow_in_expr) {
return 0;
}