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

Function PushMapDeps

common/ast_rewrite.cc:260–275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258}
259
260void PushMapDeps(MapExpr* struct_expr, std::stack<StackRecord>* stack) {
261 auto& entries = struct_expr->mutable_entries();
262 for (auto it = entries.rbegin(); it != entries.rend(); ++it) {
263 auto& entry = *it;
264 // The contract is to visit key, then value. So put them on the stack
265 // in the opposite order.
266 if (entry.has_value()) {
267 stack->push(StackRecord(&entry.mutable_value()));
268 }
269 // The contract is to visit key, then value. So put them on the stack
270 // in the opposite order.
271 if (entry.has_key()) {
272 stack->push(StackRecord(&entry.mutable_key()));
273 }
274 }
275}
276
277void PushComprehensionDeps(ComprehensionExpr* c, Expr* expr,
278 std::stack<StackRecord>* stack,

Callers 1

operator()Method · 0.70

Calls 4

mutable_valueMethod · 0.80
has_keyMethod · 0.80
StackRecordClass · 0.70
has_valueMethod · 0.45

Tested by

no test coverage detected