(expr: &Expr)
| 209 | } |
| 210 | |
| 211 | pub fn less_than_equal(expr: &Expr) -> Option<Expr> { |
| 212 | let Expr::BinOp { |
| 213 | op: BinOp::Le, |
| 214 | span, |
| 215 | lhs, |
| 216 | rhs, |
| 217 | } = expr |
| 218 | else { |
| 219 | return None; |
| 220 | }; |
| 221 | Some(UnOp::Not.to_expr( |
| 222 | span.clone(), |
| 223 | BinOp::Gt.to_expr(span.clone(), lhs.as_ref().clone(), rhs.as_ref().clone()), |
| 224 | )) |
| 225 | } |
| 226 | |
| 227 | pub fn greater_than_equal(expr: &Expr) -> Option<Expr> { |
| 228 | let Expr::BinOp { |