]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Allow dangling semicolons for now
authorWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 25 Nov 2012 19:18:40 +0000 (20:18 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 25 Nov 2012 19:18:40 +0000 (20:18 +0100)
parser.c

index 197cd9003f265e623fe188690db9bd4ba3536e61..a13ea7167e116702fca15cebacf964873f3cc346 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -2330,6 +2330,14 @@ static bool parse_statement(parser_t *parser, ast_block *block, ast_expression *
         *out = (ast_expression*)inner;
         return true;
     }
+    else if (parser->tok == ';')
+    {
+        if (!parser_next(parser)) {
+            parseerror(parser, "parse error after empty statement");
+            return false;
+        }
+        return true;
+    }
     else
     {
         ast_expression *exp = parse_expression(parser, false);