diff options
| author | Bobby <[email protected]> | 2024-02-07 21:26:59 +0000 |
|---|---|---|
| committer | Bobby <[email protected]> | 2024-02-07 21:26:59 +0000 |
| commit | ee1a97c282989a4c84a217991886a915abee5d3b (patch) | |
| tree | 6eeaa457988c750a02bf4d1adb4e7258660190cf /parser/parser.go | |
| parent | febcc8807295c84ec8755b2468cc943cfa882a59 (diff) | |
| download | mana-ee1a97c282989a4c84a217991886a915abee5d3b.tar.xz mana-ee1a97c282989a4c84a217991886a915abee5d3b.zip | |
removing optional ; todos
Diffstat (limited to 'parser/parser.go')
| -rw-r--r-- | parser/parser.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/parser/parser.go b/parser/parser.go index 31e89f3..c7d6234 100644 --- a/parser/parser.go +++ b/parser/parser.go @@ -181,8 +181,9 @@ func (p *Parser) parseLetStatement() *ast.LetStatement { return nil } - // TODO: We're skipping the expressions until we - // encounter a semicolon. + p.nextToken() + + stmt.Value = p.parseExpression(LOWEST) for !p.curTokenIs(tokens.SEMICOLON) { p.nextToken() @@ -197,8 +198,7 @@ func (p *Parser) parseReturnStatement() *ast.ReturnStatement { p.nextToken() - // TODO: We're skipping the expressions until we - // encounter a semicolon. + stmt.ReturnValue = p.parseExpression(LOWEST) for !p.curTokenIs(tokens.SEMICOLON) { p.nextToken() |
