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

Method CallExprToProto

common/ast/expr_proto.cc:132–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130 }
131
132 absl::Status CallExprToProto(const Expr& expr, const CallExpr& call_expr,
133 ExprProto* absl_nonnull proto) {
134 proto->Clear();
135 auto* call_proto = proto->mutable_call_expr();
136 proto->set_id(expr.id());
137 if (call_expr.has_target()) {
138 Push(call_expr.target(), call_proto->mutable_target());
139 }
140 call_proto->set_function(call_expr.function());
141 if (!call_expr.args().empty()) {
142 call_proto->mutable_args()->Reserve(
143 static_cast<int>(call_expr.args().size()));
144 for (const auto& argument : call_expr.args()) {
145 Push(argument, call_proto->add_args());
146 }
147 }
148 return absl::OkStatus();
149 }
150
151 absl::Status ListExprToProto(const Expr& expr, const ListExpr& list_expr,
152 ExprProto* absl_nonnull proto) {

Callers

nothing calls this directly

Calls 9

has_targetMethod · 0.80
set_functionMethod · 0.80
argsMethod · 0.80
ClearMethod · 0.45
set_idMethod · 0.45
idMethod · 0.45
emptyMethod · 0.45
ReserveMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected