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

Function PushCallDeps

common/ast_rewrite.cc:225–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223}
224
225void PushCallDeps(CallExpr* call_expr, Expr* expr,
226 std::stack<StackRecord>* stack) {
227 const int arg_size = call_expr->args().size();
228 // Our contract is that we visit arguments in order. To do that, we need
229 // to push them onto the stack in reverse order.
230 for (int i = arg_size - 1; i >= 0; --i) {
231 stack->push(StackRecord(&call_expr->mutable_args()[i], expr, i));
232 }
233 // Are we receiver-style?
234 if (call_expr->has_target()) {
235 stack->push(
236 StackRecord(&call_expr->mutable_target(), expr, StackRecord::kTarget));
237 }
238}
239
240void PushListDeps(ListExpr* list_expr, std::stack<StackRecord>* stack) {
241 auto& elements = list_expr->mutable_elements();

Callers 1

operator()Method · 0.70

Calls 4

argsMethod · 0.80
has_targetMethod · 0.80
StackRecordClass · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected