]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
eof after parsing the semicolon of a function declaration shouldn't be an error...
authorWolfgang (Blub) Bumiller <blub@speed.at>
Tue, 14 Aug 2012 14:14:26 +0000 (16:14 +0200)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Tue, 14 Aug 2012 14:14:26 +0000 (16:14 +0200)
parser.c

index eaa5dd19675bd9999cb4bb4882e387e3713cbd45..60857df4a239fb8f848cc89661aaba087fe45892 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -1622,7 +1622,7 @@ static bool parser_variable(parser_t *parser, ast_block *localblock)
             }
 
             if (parser->tok == ';')
-                return parser_next(parser);
+                return parser_next(parser) || parser->tok == TOKEN_EOF;
             else if (opts_standard == COMPILER_QCC)
                 parseerror(parser, "missing semicolon after function body (mandatory with -std=qcc)");
             return true;