mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-23 20:33:05 +00:00
and 'const' is a keyword, not an ident
This commit is contained in:
parent
ac9d68387c
commit
75ab0e6663
1 changed files with 1 additions and 1 deletions
2
parser.c
2
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'");
|
||||
|
|
Loading…
Reference in a new issue