Skip to content

Commit

Permalink
fix class constructor parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
houcine7 committed Apr 28, 2024
1 parent b0173cc commit 67e4685
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 67e4685

Please sign in to comment.