]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
and 'const' is a keyword, not an ident
authorWolfgang (Blub) Bumiller <blub@speed.at>
Fri, 30 Nov 2012 23:33:07 +0000 (00:33 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Fri, 30 Nov 2012 23:33:07 +0000 (00:33 +0100)
parser.c

index 01e3691e31ca8a4279dd42a846a1965605b84c70..f6a3024ac8cddf19579af604944ff18747eff81e 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -4175,7 +4175,7 @@ static bool parser_global_statement(parser_t *parser)
                 parseerror(parser, "expected variable declaration after 'var'");
                 return false;
             }
-            if (parser->tok == TOKEN_IDENT && !strcmp(parser_tokval(parser), "const")) {
+            if (parser->tok == TOKEN_KEYWORD && !strcmp(parser_tokval(parser), "const")) {
                 (void)!parsewarning(parser, WARN_CONST_VAR, "ignoring `const` after 'var' qualifier");
                 if (!parser_next(parser)) {
                     parseerror(parser, "expected variable declaration after 'const var'");