diff --git a/parser/parser.go b/parser/parser.go index b091c7d..5e3f88b 100644 --- a/parser/parser.go +++ b/parser/parser.go @@ -11,7 +11,8 @@ import ( const ( _ int = iota LOWEST - LOGICAL // && or || + LOGICAL_OR // || + LOGICAL_AND // && EQUALS // == or != LESSGREATER // <, >, <=, or >= SUM // + or - @@ -29,8 +30,8 @@ For example, the expression 5 + 10 * 2 is grouped as 5 + (10 * 2) because the * has a higher precedence than the + operator. */ var precedences = map[token.TokenType]int{ - token.AND: LOGICAL, - token.OR: LOGICAL, + token.OR: LOGICAL_OR, + token.AND: LOGICAL_AND, token.EQ: EQUALS, token.NOT_EQ: EQUALS, token.LT: LESSGREATER,