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

Function PushStructDeps

common/ast_rewrite.cc:248–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246}
247
248void PushStructDeps(StructExpr* struct_expr, std::stack<StackRecord>* stack) {
249 auto& entries = struct_expr->mutable_fields();
250 for (auto it = entries.rbegin(); it != entries.rend(); ++it) {
251 auto& entry = *it;
252 // The contract is to visit key, then value. So put them on the stack
253 // in the opposite order.
254 if (entry.has_value()) {
255 stack->push(StackRecord(&entry.mutable_value()));
256 }
257 }
258}
259
260void PushMapDeps(MapExpr* struct_expr, std::stack<StackRecord>* stack) {
261 auto& entries = struct_expr->mutable_entries();

Callers 1

operator()Method · 0.70

Calls 3

mutable_valueMethod · 0.80
StackRecordClass · 0.70
has_valueMethod · 0.45

Tested by

no test coverage detected