currentPrecedence returns the precedence of the current token in the input, if it is a known operator, or the lowest precedence otherwise.
()
| 707 | // currentPrecedence returns the precedence of the current token in the input, if it is a known |
| 708 | // operator, or the lowest precedence otherwise. |
| 709 | func (p *Parser) currentPrecedence() int { |
| 710 | if pr, ok := precedences[p.currentToken.Type]; ok { |
| 711 | return pr |
| 712 | } |
| 713 | return LOWEST |
| 714 | } |
| 715 | |
| 716 | func (p *Parser) parseIdentifierOrCall() (ast.Expression, error) { |
| 717 | // Ensure the current token is a valid identifier before proceeding. |
no outgoing calls
no test coverage detected