diff --git a/hscript/Parser.hx b/hscript/Parser.hx index aa011d0e..f71bb59b 100644 --- a/hscript/Parser.hx +++ b/hscript/Parser.hx @@ -605,7 +605,10 @@ class Parser { switch (tk) { case TOp("="): e = parseExpr(); + case TOp(_): unexpected(tk); case TComma | TSemicolon: push(tk); + // Above case should be enough but semicolon is not mandatory after } + case _ if (t != null): push(tk); default: unexpected(tk); }