| 297 | |
| 298 | struct PushDepsVisitor { |
| 299 | void operator()(const ExprRecord& record) { |
| 300 | struct { |
| 301 | std::stack<StackRecord>& stack; |
| 302 | const RewriteTraversalOptions& options; |
| 303 | const ExprRecord& record; |
| 304 | void operator()(const Constant&) {} |
| 305 | void operator()(const IdentExpr&) {} |
| 306 | void operator()(const SelectExpr&) { |
| 307 | PushSelectDeps(&record.expr->mutable_select_expr(), &stack); |
| 308 | } |
| 309 | void operator()(const CallExpr&) { |
| 310 | PushCallDeps(&record.expr->mutable_call_expr(), record.expr, &stack); |
| 311 | } |
| 312 | void operator()(const ListExpr&) { |
| 313 | PushListDeps(&record.expr->mutable_list_expr(), &stack); |
| 314 | } |
| 315 | void operator()(const StructExpr&) { |
| 316 | PushStructDeps(&record.expr->mutable_struct_expr(), &stack); |
| 317 | } |
| 318 | void operator()(const MapExpr&) { |
| 319 | PushMapDeps(&record.expr->mutable_map_expr(), &stack); |
| 320 | } |
| 321 | void operator()(const ComprehensionExpr&) { |
| 322 | PushComprehensionDeps(&record.expr->mutable_comprehension_expr(), |
| 323 | record.expr, &stack, |
| 324 | options.use_comprehension_callbacks); |
| 325 | } |
| 326 | void operator()(const UnspecifiedExpr&) {} |
| 327 | } handler{stack, options, record}; |
| 328 | absl::visit(handler, record.expr->kind()); |
| 329 | } |
| 330 | |
| 331 | void operator()(const ArgRecord& record) { |
| 332 | stack.push(StackRecord(record.expr)); |
nothing calls this directly
no test coverage detected