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

Function PushStructDeps

eval/public/ast_traverse.cc:262–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

operator()Method · 0.70

Calls 3

StackRecordClass · 0.70
has_valueMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected