]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Parse the 'not' keyword in if as TOKEN_IDENT
authorWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 25 Nov 2012 18:20:00 +0000 (19:20 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 25 Nov 2012 18:20:00 +0000 (19:20 +0100)
parser.c

index 40af422904b36759f0a81dffec6b7e952dd31c7e..69e89d509b86bb4a506170e5ddc1720d1f343071 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -1701,7 +1701,7 @@ static bool parse_if(parser_t *parser, ast_block *block, ast_expression **out)
         parseerror(parser, "expected condition or 'not'");
         return false;
     }
         parseerror(parser, "expected condition or 'not'");
         return false;
     }
-    if (parser->tok == TOKEN_KEYWORD && !strcmp(parser_tokval(parser), "not")) {
+    if (parser->tok == TOKEN_IDENT && !strcmp(parser_tokval(parser), "not")) {
         ifnot = true;
         if (!parser_next(parser)) {
             parseerror(parser, "expected condition in parenthesis");
         ifnot = true;
         if (!parser_next(parser)) {
             parseerror(parser, "expected condition in parenthesis");