| 129 | |
| 130 | struct PreVisitor { |
| 131 | void operator()(const ExprRecord& record) { |
| 132 | Expr* expr = record.expr; |
| 133 | const SourcePosition position(expr->id(), record.source_info); |
| 134 | visitor->PreVisitExpr(expr, &position); |
| 135 | switch (expr->expr_kind_case()) { |
| 136 | case Expr::kSelectExpr: |
| 137 | visitor->PreVisitSelect(&expr->select_expr(), expr, &position); |
| 138 | break; |
| 139 | case Expr::kCallExpr: |
| 140 | visitor->PreVisitCall(&expr->call_expr(), expr, &position); |
| 141 | break; |
| 142 | case Expr::kComprehensionExpr: |
| 143 | visitor->PreVisitComprehension(&expr->comprehension_expr(), expr, |
| 144 | &position); |
| 145 | break; |
| 146 | default: |
| 147 | // No pre-visit action. |
| 148 | break; |
| 149 | } |
| 150 | } |
| 151 | |
| 152 | // Do nothing for Arg variant. |
| 153 | void operator()(const ArgRecord&) {} |
nothing calls this directly
no test coverage detected