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

Method Evaluate

eval/eval/equality_steps.cc:113–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111 : ExpressionStepBase(expr_id), negation_(negation) {}
112
113 absl::Status Evaluate(ExecutionFrame* frame) const override {
114 if (!frame->value_stack().HasEnough(2)) {
115 return absl::Status(absl::StatusCode::kInternal, "Value stack underflow");
116 }
117 auto args = frame->value_stack().GetSpan(2);
118 auto attrs = frame->value_stack().GetAttributeSpan(2);
119
120 CEL_ASSIGN_OR_RETURN(Value result,
121 EvaluateEquality(*frame, args[0], attrs[0], args[1],
122 attrs[1], negation_));
123
124 frame->value_stack().PopAndPush(2, std::move(result));
125 return absl::OkStatus();
126 }
127
128 private:
129 bool negation_;

Callers

nothing calls this directly

Calls 4

HasEnoughMethod · 0.80
GetSpanMethod · 0.80
GetAttributeSpanMethod · 0.80
PopAndPushMethod · 0.80

Tested by

no test coverage detected