Make sure to add parens if a PncApply dbg stmt becomes a space-separated Apply

This commit is contained in:
Joshua Warner 2025-01-09 18:36:00 -08:00
parent 0438c17503
commit 8deca25c5e
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
5 changed files with 45 additions and 1 deletions

View file

@ -0,0 +1,2 @@
dbg (a / a)
d

View file

@ -0,0 +1,32 @@
@0-8 SpaceAfter(
DbgStmt {
first: @4-7 BinOps(
[
(
@4-5 Var {
module_name: "",
ident: "a",
},
@5-6 Slash,
),
],
@6-7 Var {
module_name: "",
ident: "a",
},
),
extra_args: [],
continuation: @9-10 SpaceBefore(
Var {
module_name: "",
ident: "d",
},
[
Newline,
],
),
},
[
Newline,
],
)

View file

@ -0,0 +1,2 @@
dbg(a/a)
d

View file

@ -397,6 +397,7 @@ mod test_snapshots {
pass/dbg_double_newline.expr,
pass/dbg_extra_parens.expr,
pass/dbg_newline_apply.expr,
pass/dbg_pnc_a_over_a.expr,
pass/dbg_stmt.expr,
pass/dbg_stmt_in_parens.expr,
pass/dbg_stmt_multiline.expr,