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

Method PostVisitConst

eval/compiler/flat_expr_builder.cc:679–702  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

677 }
678
679 void PostVisitConst(const cel::Expr& expr,
680 const cel::Constant& const_expr) override {
681 if (!progress_status_.ok()) {
682 return;
683 }
684
685 absl::StatusOr<cel::Value> converted_value =
686 ConvertConstant(const_expr, cel::NewDeleteAllocator());
687
688 if (!converted_value.ok()) {
689 SetProgressStatusError(converted_value.status());
690 return;
691 }
692
693 if (options_.max_recursion_depth > 0 || options_.max_recursion_depth < 0) {
694 SetRecursiveStep(CreateConstValueDirectStep(
695 std::move(converted_value).value(), expr.id()),
696 1);
697 return;
698 }
699
700 AddStep(
701 CreateConstValueStep(std::move(converted_value).value(), expr.id()));
702 }
703
704 struct SlotLookupResult {
705 int slot;

Callers

nothing calls this directly

Calls 7

ConvertConstantFunction · 0.85
NewDeleteAllocatorClass · 0.85
CreateConstValueStepFunction · 0.85
okMethod · 0.45
valueMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected