Normalize return's 'after'

This commit is contained in:
Joshua Warner 2024-12-12 19:29:41 -08:00
parent 17849ca556
commit 2857833c35
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
5 changed files with 73 additions and 1 deletions

View file

@ -0,0 +1,37 @@
SpaceAfter(
Return(
@0-8 Var {
module_name: "",
ident: "n",
},
Some(
@9-17 SpaceBefore(
ParensAround(
SpaceAfter(
ParensAround(
SpaceAfter(
Num(
"0",
),
[
Newline,
],
),
),
[
LineComment(
"",
),
],
),
),
[
Newline,
],
),
),
),
[
Newline,
],
)

View file

@ -0,0 +1,4 @@
return n
((0
)#
)

View file

@ -610,6 +610,7 @@ mod test_snapshots {
pass/return_minus_one.expr,
pass/return_multiline.expr,
pass/return_only_statement.expr,
pass/return_then_nested_parens.expr,
pass/return_with_after.expr,
pass/separate_defs.moduledefs,
pass/single_arg_closure.expr,