Created
September 26, 2019 04:51
-
-
Save kooooohe/57fcf2b867adb0a940f8918dff385470 to your computer and use it in GitHub Desktop.
[Blog][TopDownOperatorPrecedence(再帰下降構文解析)におけるExpression(式)の解析処理を追う] parseExpressionStatement.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func (p *Parser) parseExpressionStatement() *ast.ExpressionStatement { | |
stmt := &ast.ExpressionStatement{Token: p.curToken} | |
stmt.Expression = p.parseExpression(LOWEST) | |
if p.peekTokenIs(token.SEMICOLON) { | |
p.nextToken() | |
} | |
return stmt | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment