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

Function PushCallDeps

common/ast_traverse.cc:198–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196}
197
198void PushCallDeps(const CallExpr* call_expr, const Expr* expr,
199 std::stack<StackRecord>* stack) {
200 const int arg_size = call_expr->args().size();
201 // Our contract is that we visit arguments in order. To do that, we need
202 // to push them onto the stack in reverse order.
203 for (int i = arg_size - 1; i >= 0; --i) {
204 stack->push(StackRecord(&call_expr->args()[i], expr, i));
205 }
206 // Are we receiver-style?
207 if (call_expr->has_target()) {
208 stack->push(StackRecord(&call_expr->target(), expr, StackRecord::kTarget));
209 }
210}
211
212void PushListDeps(const ListExpr* list_expr, std::stack<StackRecord>* stack) {
213 const auto& elements = list_expr->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