Fix formatting issue with closures hiding in unary ops

This commit is contained in:
Joshua Warner 2024-12-24 14:38:23 -05:00
parent 8f0566a55f
commit 2464ce6856
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
5 changed files with 68 additions and 4 deletions

View file

@ -0,0 +1,49 @@
@0-14 SpaceAfter(
BinOps(
[
(
@0-1 SpaceAfter(
Var {
module_name: "",
ident: "m",
},
[
Newline,
],
),
@3-4 Caret,
),
],
@5-14 Apply(
@5-11 UnaryOp(
@6-11 Closure(
[
@7-8 Identifier {
ident: "w",
},
],
@10-11 Var {
module_name: "",
ident: "m",
},
),
@5-6 Negate,
),
[
@13-14 SpaceBefore(
Var {
module_name: "",
ident: "w",
},
[
Newline,
],
),
],
Space,
),
),
[
Newline,
],
)

View file

@ -355,6 +355,7 @@ mod test_snapshots {
pass/closure_newline_empty_record_newline.expr,
pass/closure_parens_double_newlines.expr,
pass/closure_pat_reccord_comment.expr,
pass/closure_with_binops_and_unary.expr,
pass/closure_with_underscores.expr,
pass/comma_prefixed_indented_record.expr,
pass/comment_after_annotation.expr,