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

Function isComplexOperatorWithRespectTo

cel2sql.go:774–779  ·  view source on GitHub ↗

Indicates whether it is a complex operation compared to another. expr is *not* considered complex if it is not a call expression or has less than two arguments, or if it has a higher precedence than op.

(op string, expr *exprpb.Expr)

Source from the content-addressed store, hash-verified

772// expr is *not* considered complex if it is not a call expression or has
773// less than two arguments, or if it has a higher precedence than op.
774func isComplexOperatorWithRespectTo(op string, expr *exprpb.Expr) bool {
775 if expr.GetCallExpr() == nil || len(expr.GetCallExpr().GetArgs()) < 2 {
776 return false
777 }
778 return isLowerPrecedence(op, expr)
779}
780
781// Indicate whether this is a binary or ternary operator.
782func isBinaryOrTernaryOperator(expr *exprpb.Expr) bool {

Callers 2

visitCallBinaryMethod · 0.85

Calls 1

isLowerPrecedenceFunction · 0.85

Tested by

no test coverage detected