MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / HandleHeterogeneousEqualityIn

Method HandleHeterogeneousEqualityIn

eval/compiler/flat_expr_builder.cc:2120–2143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2118}
2119
2120FlatExprVisitor::CallHandlerResult
2121FlatExprVisitor::HandleHeterogeneousEqualityIn(const cel::Expr& expr,
2122 const cel::CallExpr& call) {
2123 if (!ValidateOrError(call.args().size() == 2 && !call.has_target(),
2124 "unexpected number of args for builtin 'in' operator")) {
2125 return CallHandlerResult::kIntercepted;
2126 }
2127
2128 if (auto depth = RecursionEligible(); depth.has_value()) {
2129 auto args = ExtractRecursiveDependencies();
2130 if (args.size() != 2) {
2131 SetProgressStatusError(absl::InvalidArgumentError(
2132 "unexpected number of args for builtin 'in' operator"));
2133 return CallHandlerResult::kIntercepted;
2134 }
2135 SetRecursiveStep(
2136 CreateDirectInStep(std::move(args[0]), std::move(args[1]), expr.id()),
2137 *depth + 1);
2138 return CallHandlerResult::kIntercepted;
2139 }
2140
2141 AddStep(CreateInStep(expr.id()));
2142 return CallHandlerResult::kIntercepted;
2143}
2144
2145void BinaryCondVisitor::PreVisit(const cel::Expr* expr) {
2146 switch (cond_) {

Callers

nothing calls this directly

Calls 7

CreateDirectInStepFunction · 0.85
CreateInStepFunction · 0.85
argsMethod · 0.80
has_targetMethod · 0.80
sizeMethod · 0.45
has_valueMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected