From: Wolfgang (Blub) Bumiller Date: Fri, 9 Nov 2012 21:57:11 +0000 (+0100) Subject: Making the = in front of function bodies optional X-Git-Tag: 0.1~19^2~57 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=016257c44e8adbc1485c8462391957d6b20d3e38;p=xonotic%2Fgmqcc.git Making the = in front of function bodies optional --- diff --git a/parser.c b/parser.c index b615834..27583ae 100644 --- a/parser.c +++ b/parser.c @@ -2759,14 +2759,16 @@ skipvar: } } - if (parser->tok != '=') { - parseerror(parser, "missing semicolon or initializer"); - break; - } + if (parser->tok != '{') { + if (parser->tok != '=') { + parseerror(parser, "missing semicolon or initializer"); + break; + } - if (!parser_next(parser)) { - parseerror(parser, "error parsing initializer"); - break; + if (!parser_next(parser)) { + parseerror(parser, "error parsing initializer"); + break; + } } if (parser->tok == '#') {