mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-27 22:22:17 +00:00
without -std=gmqcc fields are accessible anywhere where globals are
This commit is contained in:
parent
fd1a850629
commit
ae73332832
1 changed files with 3 additions and 0 deletions
3
parser.c
3
parser.c
|
@ -601,6 +601,9 @@ static ast_expression* parser_expression(parser_t *parser)
|
|||
{
|
||||
/* variable */
|
||||
ast_expression *var = parser_find_var(parser, parser_tokval(parser));
|
||||
/* in the gmqcc standard, fields are in their own namespace */
|
||||
if (!var && opts_standard != COMPILER_GMQCC)
|
||||
var = parser_find_field(parser, parser_tokval(parser));
|
||||
if (!var) {
|
||||
parseerror(parser, "unexpected ident: %s", parser_tokval(parser));
|
||||
goto onerr;
|
||||
|
|
Loading…
Reference in a new issue