MCPcopy Create free account
hub / github.com/cockscomb/cel2sql / isSamePrecedence

Function isSamePrecedence

cel2sql.go:740–747  ·  view source on GitHub ↗

isSamePrecedence indicates whether the precedence of the input operator is the same as the precedence of 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

738//
739// If the expr is not a Call, the result is false.
740func isSamePrecedence(op string, expr *exprpb.Expr) bool {
741 if expr.GetCallExpr() == nil {
742 return false
743 }
744 c := expr.GetCallExpr()
745 other := c.GetFunction()
746 return operators.Precedence(op) == operators.Precedence(other)
747}
748
749// isLowerPrecedence indicates whether the precedence of the input operator is lower precedence
750// than the (possible) operation represented in the input Expr.

Callers 2

visitCallBinaryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected