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

Function PushStructDeps

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

Source from the content-addressed store, hash-verified

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

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