Created
September 26, 2019 05:31
-
-
Save 0xkohe/bafc9452d3b921a586015d0ce82cb737 to your computer and use it in GitHub Desktop.
[Blog][TopDownOperatorPrecedence(再帰下降構文解析)におけるExpression(式)の解析処理を追う] token precedences
This file contains hidden or 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
var precedences = map[token.TokenType]int{ | |
token.EQ: EQUALS, | |
token.NOT_EQ: EQUALS, | |
token.LT: LESSGRETER, | |
token.GT: LESSGRETER, | |
token.PLUS: SUM, | |
token.MINUS: SUM, | |
token.SLASH: PRODUCT, | |
token.ASTERISK: PRODUCT, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment