]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
allow a semicolon after function bodies - make it mandatory with -std=qcc
authorWolfgang (Blub) Bumiller <blub@speed.at>
Tue, 14 Aug 2012 12:38:02 +0000 (14:38 +0200)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Tue, 14 Aug 2012 12:38:02 +0000 (14:38 +0200)
parser.c

index bfd036ffe08607093eee41fc6e61243745260d20..12e7de610270872bc9999aef7d06805094e2c7da 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -1622,6 +1622,11 @@ static bool parser_variable(parser_t *parser, ast_block *localblock)
                 ast_block_delete(block);
                 return false;
             }
+
+            if (parser->tok == ';')
+                return parser_next(parser);
+            else if (opts_standard == COMPILER_QCC)
+                parseerror(parser, "missing semicolon after function body (mandatory with -std=qcc)");
             return true;
         } else {
             parseerror(parser, "TODO, const assignment");