Making the = in front of function bodies optional

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-11-09 22:57:11 +01:00
parent b17fe4db0b
commit 016257c44e

View file

@ -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 == '#') {