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

Function PushMapDeps

common/ast_traverse.cc:233–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231}
232
233void PushMapDeps(const MapExpr* map_expr, std::stack<StackRecord>* stack) {
234 const auto& entries = map_expr->entries();
235 for (auto it = entries.rbegin(); it != entries.rend(); ++it) {
236 const auto& entry = *it;
237 // The contract is to visit key, then value. So put them on the stack
238 // in the opposite order.
239 if (entry.has_value()) {
240 stack->push(StackRecord(&entry.value()));
241 }
242 // The contract is to visit key, then value. So put them on the stack
243 // in the opposite order.
244 if (entry.has_key()) {
245 stack->push(StackRecord(&entry.key()));
246 }
247 }
248}
249
250void PushComprehensionDeps(const ComprehensionExpr* c, const Expr* expr,
251 std::stack<StackRecord>* stack,

Callers 1

operator()Method · 0.70

Calls 5

has_keyMethod · 0.80
keyMethod · 0.80
StackRecordClass · 0.70
has_valueMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected