From 159150c6d9a7d421c0d58bd582847104799606d4 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 16 Jan 2020 10:00:14 +0000 Subject: Allow not_in as keyword over notin, but still allow notin to work --- src/parser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/parser.cpp') 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; } -- cgit v1.2.3