From: Wolfgang (Blub) Bumiller Date: Fri, 30 Nov 2012 23:33:07 +0000 (+0100) Subject: and 'const' is a keyword, not an ident X-Git-Tag: 0.1.9~150 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=75ab0e666362fea2ffd801d6ce623962632425f0;p=xonotic%2Fgmqcc.git and 'const' is a keyword, not an ident --- diff --git a/parser.c b/parser.c index 01e3691..f6a3024 100644 --- 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'");