mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-23 01:51:44 +00:00
Make sure to add parens if a PncApply dbg stmt becomes a space-separated Apply
This commit is contained in:
parent
0438c17503
commit
8deca25c5e
5 changed files with 45 additions and 1 deletions
|
@ -1340,9 +1340,16 @@ pub fn expr_lift_spaces<'a, 'b: 'a>(
|
|||
|
||||
let right_lifted = expr_lift_spaces_after(Parens::InOperator, arena, &right.value);
|
||||
|
||||
let mut item =
|
||||
Expr::BinOps(lefts, arena.alloc(Loc::at(right.region, right_lifted.item)));
|
||||
|
||||
if parens == Parens::InApply || parens == Parens::InApplyLastArg {
|
||||
item = Expr::ParensAround(arena.alloc(item));
|
||||
}
|
||||
|
||||
Spaces {
|
||||
before,
|
||||
item: Expr::BinOps(lefts, arena.alloc(Loc::at(right.region, right_lifted.item))),
|
||||
item,
|
||||
after: right_lifted.after,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue