mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
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:
parent
255a388c28
commit
20d092ea48
8 changed files with 121 additions and 50 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue