]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
Allow 'var' in functions... even there initialized locals seem to be constant by...
authorWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 25 Nov 2012 21:15:08 +0000 (22:15 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 25 Nov 2012 21:15:08 +0000 (22:15 +0100)
parser.c

index c840ae6e3f08bb1ea24826a1bcb31a98bf9fe60e..833333ab6230beec1d5a730543db4108c36b99df 100644 (file)
--- 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;