"current standard does not allow variable declarations in for-loop initializers"))
goto onerr;
}
- if (!parse_variable(parser, block, CV_VAR, false, typevar))
+ if (!parse_variable(parser, block, true, CV_VAR, typevar))
goto onerr;
}
else if (parser->tok != ';')
if (parsewarning(parser, WARN_EXTENSIONS, "missing 'local' keyword when declaring a local variable"))
return false;
}
- if (!parse_variable(parser, block, CV_NONE, false, typevar))
+ if (!parse_variable(parser, block, false, CV_NONE, typevar))
return false;
*out = NULL;
return true;
parseerror(parser, "expected variable declaration");
return false;
}
- if (!parse_variable(parser, block, CV_VAR, false, NULL))
+ if (!parse_variable(parser, block, true, CV_VAR, NULL))
return false;
*out = NULL;
return true;
parseerror(parser, "cannot initialize a global constant variable with a non-constant expression");
else
{
- if (opts_standard != COMPILER_GMQCC && !OPTS_FLAG(INITIALIZED_NONCONSTANTS) &&
+ if (opts_standard != COMPILER_GMQCC &&
+ !OPTS_FLAG(INITIALIZED_NONCONSTANTS) &&
is_const_var != CV_VAR)
{
var->constant = true;
if (istype || parser->tok == TOKEN_TYPENAME || parser->tok == '.')
{
- return parse_variable(parser, NULL, CV_NONE, false, istype);
+ return parse_variable(parser, NULL, false, CV_NONE, istype);
}
else if (parser->tok == TOKEN_IDENT && !strcmp(parser_tokval(parser), "var"))
{
parseerror(parser, "expected variable declaration after 'var'");
return false;
}
- return parse_variable(parser, NULL, CV_VAR, false, NULL);
+ return parse_variable(parser, NULL, true, CV_VAR, NULL);
}
}
else if (parser->tok == TOKEN_KEYWORD)
return false;
}
}
- return parse_variable(parser, NULL, CV_CONST, true, NULL);
+ return parse_variable(parser, NULL, true, CV_CONST, NULL);
}
else if (!strcmp(parser_tokval(parser), "typedef")) {
if (!parser_next(parser)) {