Fix when branches to use lifting as well

This commit is contained in:
Joshua Warner 2024-12-16 18:43:14 -08:00
parent e068ae6b5a
commit c4077dc971
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
5 changed files with 62 additions and 19 deletions

View file

@ -0,0 +1,36 @@
@0-17 SpaceAfter(
When(
@5-6 SpaceAfter(
Num(
"0",
),
[
Newline,
],
),
[
WhenBranch {
patterns: [
@10-11 Tag(
"B",
),
],
value: @13-17 ParensAround(
SpaceBefore(
Var {
module_name: "",
ident: "t",
},
[
Newline,
],
),
),
guard: None,
},
],
),
[
Newline,
],
)

View file

@ -735,6 +735,7 @@ mod test_snapshots {
pass/when_in_parens.expr,
pass/when_in_parens_indented.expr,
pass/when_newline_after_condition.expr,
pass/when_newline_before_is_and_in_branch_parens.expr,
pass/when_result_list.expr,
pass/when_with_alternative_patterns.expr,
pass/when_with_function_application.expr,