From: Wolfgang (Blub) Bumiller Date: Sun, 25 Nov 2012 21:15:08 +0000 (+0100) Subject: Allow 'var' in functions... even there initialized locals seem to be constant by... X-Git-Tag: 0.1.9~226 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c62e0a93eb114d28d8ac984a75e42b59490534a3;p=xonotic%2Fgmqcc.git Allow 'var' in functions... even there initialized locals seem to be constant by default... laaaaaaaame --- diff --git a/parser.c b/parser.c index c840ae6..833333a 100644 --- a/parser.c +++ b/parser.c @@ -2294,7 +2294,8 @@ static bool parse_statement(parser_t *parser, ast_block *block, ast_expression * else if (parser->tok == TOKEN_KEYWORD) { if (!strcmp(parser_tokval(parser), "local") || - !strcmp(parser_tokval(parser), "const")) + !strcmp(parser_tokval(parser), "const") || + !strcmp(parser_tokval(parser), "var")) { int cvq = parser_tokval(parser)[0] == 'c' ? CV_CONST : CV_VAR;