From 016257c44e8adbc1485c8462391957d6b20d3e38 Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Fri, 9 Nov 2012 22:57:11 +0100 Subject: [PATCH] Making the = in front of function bodies optional --- parser.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) 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 == '#') { -- 2.39.2