diff --git a/internal/parser/parser.go b/internal/parser/parser.go index 1b7c01a..2c0fe79 100644 --- a/internal/parser/parser.go +++ b/internal/parser/parser.go @@ -179,6 +179,10 @@ func (p *Parser) parseClass() ast.Expression { } exp.Methods, exp.DataMembers = methods, fields + if !p.expectedNextToken(token.CreateToken(token.RCB, "}")) { + return nil + } + return exp }