GMQCC_DEFINE_FLAG(PREPROCESSOR)
GMQCC_DEFINE_FLAG(MULTIFILE_IF)
GMQCC_DEFINE_FLAG(DOUBLE_DECLARATION)
+ GMQCC_DEFINE_FLAG(CONST_VAR)
#endif
/* some cleanup so we don't have to */
parseerror(parser, "expected variable declaration after 'const'");
return false;
}
+ if (parser->tok == TOKEN_IDENT && !strcmp(parser_tokval(parser), "var")) {
+ (void)!parsewarning(parser, WARN_CONST_VAR, "ignoring `var` after const qualifier");
+ if (!parser_next(parser)) {
+ parseerror(parser, "expected variable declaration after 'const var'");
+ return false;
+ }
+ }
return parse_variable(parser, NULL, true, true, NULL);
}
else if (!strcmp(parser_tokval(parser), "typedef")) {