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

Function isComplexOperator

parser/unparser.go:541–546  ·  view source on GitHub ↗

Indicates whether the expr is a complex operator, i.e., a call expression with 2 or more arguments.

(expr ast.Expr)

Source from the content-addressed store, hash-verified

539// Indicates whether the expr is a complex operator, i.e., a call expression
540// with 2 or more arguments.
541func isComplexOperator(expr ast.Expr) bool {
542 if expr.Kind() == ast.CallKind && len(expr.AsCall().Args()) >= 2 {
543 return true
544 }
545 return false
546}
547
548// Indicates whether the operand of a unary operator must be wrapped in parentheses in order for
549// the unparsed expression to parse back to an equivalent AST.

Callers 2

visitCallConditionalMethod · 0.85
visitCallUnaryMethod · 0.85

Calls 3

KindMethod · 0.65
ArgsMethod · 0.65
AsCallMethod · 0.65

Tested by

no test coverage detected