Create an [`Iterator`] for [`LocalId`] values that are guaranteed to be fresh within the scope of the given [`HirRelationExpr`].
(expr: &HirRelationExpr)
| 153 | // Create an [`Iterator`] for [`LocalId`] values that are guaranteed to be |
| 154 | // fresh within the scope of the given [`HirRelationExpr`]. |
| 155 | fn id_gen(expr: &HirRelationExpr) -> impl Iterator<Item = LocalId> + use<> { |
| 156 | let mut max_id = 0_u64; |
| 157 | |
| 158 | expr.visit_pre(&mut |expr| { |
| 159 | match expr { |
| 160 | HirRelationExpr::Let { id, .. } => max_id = std::cmp::max(max_id, id.into()), |
| 161 | _ => (), |
| 162 | }; |
| 163 | }); |
| 164 | |
| 165 | (max_id + 1..).map(LocalId::new) |
| 166 | } |
| 167 | |
| 168 | impl ScalarOps for HirScalarExpr { |
| 169 | fn match_col_ref(&self) -> Option<usize> { |
no test coverage detected