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

Method Evaluate

eval/eval/function_step.cc:271–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269}
270
271absl::Status AbstractFunctionStep::Evaluate(ExecutionFrame* frame) const {
272 if (!frame->value_stack().HasEnough(num_arguments_)) {
273 return absl::Status(absl::StatusCode::kInternal, "Value stack underflow");
274 }
275
276 // DoEvaluate may return a status for non-recoverable errors (e.g.
277 // unexpected typing, illegal expression state). Application errors that can
278 // reasonably be handled as a cel error will appear in the result value.
279 CEL_ASSIGN_OR_RETURN(auto result, DoEvaluate(frame));
280
281 frame->value_stack().PopAndPush(num_arguments_, std::move(result));
282
283 return absl::OkStatus();
284}
285
286absl::StatusOr<ResolveResult> ResolveStatic(
287 absl::Span<const cel::Value> input_args,

Callers 1

EvaluateMethod · 0.45

Calls 2

HasEnoughMethod · 0.80
PopAndPushMethod · 0.80

Tested by

no test coverage detected