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

Function CreateDirectOptionalOrStep

eval/eval/optional_or_step.cc:290–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

288}
289
290std::unique_ptr<DirectExpressionStep> CreateDirectOptionalOrStep(
291 int64_t expr_id, std::unique_ptr<DirectExpressionStep> optional,
292 std::unique_ptr<DirectExpressionStep> alternative, bool is_or_value,
293 bool short_circuiting) {
294 auto kind =
295 is_or_value ? OptionalOrKind::kOrValue : OptionalOrKind::kOrOptional;
296 if (short_circuiting) {
297 return std::make_unique<DirectOptionalOrStep>(expr_id, std::move(optional),
298 std::move(alternative), kind);
299 } else {
300 return std::make_unique<ExhaustiveDirectOptionalOrStep>(
301 expr_id, std::move(optional), std::move(alternative), kind);
302 }
303}
304
305} // namespace google::api::expr::runtime

Callers 2

TEST_FFunction · 0.85

Calls

no outgoing calls

Tested by 1

TEST_FFunction · 0.68