MCPcopy Index your code
hub / github.com/cockscomb/cel2sql / isLowerPrecedence

Function isLowerPrecedence

cel2sql.go:753–760  ·  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 *exprpb.Expr)

Source from the content-addressed store, hash-verified

751//
752// If the expr is not a Call, the result is false.
753func isLowerPrecedence(op string, expr *exprpb.Expr) bool {
754 if expr.GetCallExpr() == nil {
755 return false
756 }
757 c := expr.GetCallExpr()
758 other := c.GetFunction()
759 return operators.Precedence(op) < operators.Precedence(other)
760}
761
762// Indicates whether the expr is a complex operator, i.e., a call expression
763// with 2 or more arguments.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected