| 258 | } |
| 259 | |
| 260 | void 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 | |
| 277 | void PushComprehensionDeps(Comprehension* c, Expr* expr, |
| 278 | const SourceInfo* source_info, |
no test coverage detected