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

Function isLowerPrecedence

parser/unparser.go:533–537  ·  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

531//
532// If the expr is not a Call, the result is false.
533func isLowerPrecedence(op string, expr ast.Expr) bool {
534 c := expr.AsCall()
535 other := c.FunctionName()
536 return operators.Precedence(op) < operators.Precedence(other)
537}
538
539// Indicates whether the expr is a complex operator, i.e., a call expression
540// with 2 or more arguments.

Callers 1

Calls 3

PrecedenceFunction · 0.92
AsCallMethod · 0.65
FunctionNameMethod · 0.65

Tested by

no test coverage detected