Skip to content

Commit d676059

Browse files
authored
Merge pull request #135 from kLabz/fix/var-with-meta
Fix var parsing with metadata
2 parents 4f7c405 + 043d9b4 commit d676059

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

hscript/Parser.hx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,10 @@ class Parser {
605605
switch (tk)
606606
{
607607
case TOp("="): e = parseExpr();
608+
case TOp(_): unexpected(tk);
608609
case TComma | TSemicolon: push(tk);
610+
// Above case should be enough but semicolon is not mandatory after }
611+
case _ if (t != null): push(tk);
609612
default: unexpected(tk);
610613
}
611614

0 commit comments

Comments
 (0)