MCPcopy Create free account
hub / github.com/Permify/permify / currentPrecedence

Method currentPrecedence

pkg/dsl/parser/parser.go:709–714  ·  view source on GitHub ↗

currentPrecedence returns the precedence of the current token in the input, if it is a known operator, or the lowest precedence otherwise.

()

Source from the content-addressed store, hash-verified

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

Callers 1

parseInfixExpressionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected