From: Wolfgang (Blub) Bumiller Date: Tue, 14 Aug 2012 12:38:02 +0000 (+0200) Subject: allow a semicolon after function bodies - make it mandatory with -std=qcc X-Git-Tag: 0.1-rc1~311 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c2364567de37e4164f45ee4016186ad36bf9c942;p=xonotic%2Fgmqcc.git allow a semicolon after function bodies - make it mandatory with -std=qcc --- diff --git a/parser.c b/parser.c index bfd036f..12e7de6 100644 --- 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");