Remove indented-else syntax from the formatter

This is step 1 in removing the syntax all together. The formatter will now seemlessly migrate everyone to the usual if/then/else syntax. After everyone has had a chance to upgrade, we can then remove this from the parser (in a future PR).
This commit is contained in:
Joshua Warner 2025-01-20 19:13:12 -08:00
parent 255a388c28
commit 20d092ea48
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
8 changed files with 121 additions and 50 deletions

View file

@ -778,11 +778,11 @@ impl<'a> Normalize<'a> for Expr<'a> {
Expr::If {
if_thens,
final_else,
indented_else,
indented_else: _,
} => Expr::If {
if_thens: if_thens.normalize(arena),
final_else: arena.alloc(final_else.normalize(arena)),
indented_else,
indented_else: false,
},
Expr::When(a, b) => Expr::When(arena.alloc(a.normalize(arena)), b.normalize(arena)),
Expr::ParensAround(a) => {