MCPcopy Create free account
hub / github.com/cel-expr/cel-go / isLowerPrecedence

Function isLowerPrecedence

parser/unparser.go:495–499  ·  view source on GitHub ↗

isLowerPrecedence indicates whether the precedence of the input operator is lower precedence than the (possible) operation represented in the input Expr. If the expr is not a Call, the result is false.

(op string, expr ast.Expr)

Source from the content-addressed store, hash-verified

493//
494// If the expr is not a Call, the result is false.
495func isLowerPrecedence(op string, expr ast.Expr) bool {
496 c := expr.AsCall()
497 other := c.FunctionName()
498 return operators.Precedence(op) < operators.Precedence(other)
499}
500
501// Indicates whether the expr is a complex operator, i.e., a call expression
502// with 2 or more arguments.

Callers 1

Calls 3

PrecedenceFunction · 0.92
AsCallMethod · 0.65
FunctionNameMethod · 0.65

Tested by

no test coverage detected