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

Method AddStep

eval/compiler/flat_expr_builder.cc:1694–1702  ·  view source on GitHub ↗

Add a step to the program, taking ownership. If successful, returns the pointer to the step. Otherwise, returns nullptr. Note: the pointer is only guaranteed to stay valid until the parent subexpression is finalized. Optimizers may modify the program plan which may free the step at that point.

Source from the content-addressed store, hash-verified

1692 // subexpression is finalized. Optimizers may modify the program plan which
1693 // may free the step at that point.
1694 ExpressionStep* AddStep(
1695 absl::StatusOr<std::unique_ptr<ExpressionStep>> step) {
1696 if (step.ok()) {
1697 return AddStep(*std::move(step));
1698 } else {
1699 SetProgressStatusError(step.status());
1700 }
1701 return nullptr;
1702 }
1703
1704 template <typename T>
1705 std::enable_if_t<std::is_base_of_v<ExpressionStep, T>, T*> AddStep(

Callers 10

PostVisitArgMethod · 0.45
PostVisitTargetMethod · 0.45
PostVisitMethod · 0.45
PostVisitArgDefaultMethod · 0.45
PostVisitArgTrivialMethod · 0.45
TEST_FFunction · 0.45
AddSubplanStepMethod · 0.45
InitSimpleTreeFunction · 0.45
TEST_FFunction · 0.45

Calls 1

okMethod · 0.45

Tested by 3

TEST_FFunction · 0.36
InitSimpleTreeFunction · 0.36
TEST_FFunction · 0.36