Fix else spacing

This commit is contained in:
Joshua Warner 2025-01-11 10:32:53 -08:00
parent 6b08f42d02
commit 1cc97fcfa7
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
5 changed files with 50 additions and 2 deletions

View file

@ -0,0 +1 @@
if "" then -p else if "" then -p else .e

View file

@ -0,0 +1,43 @@
@0-33 SpaceAfter(
If {
if_thens: [
(
@2-4 Str(
PlainLine(
"",
),
),
@8-10 UnaryOp(
@9-10 Var {
module_name: "",
ident: "p",
},
@8-9 Negate,
),
),
(
@18-20 Str(
PlainLine(
"",
),
),
@24-26 UnaryOp(
@25-26 Var {
module_name: "",
ident: "p",
},
@24-25 Negate,
),
),
],
final_else: @31-33 AccessorFunction(
RecordField(
"e",
),
),
indented_else: false,
},
[
Newline,
],
)

View file

@ -0,0 +1,2 @@
if""then-p else
if""then-p else.e

View file

@ -549,6 +549,7 @@ mod test_snapshots {
pass/negative_single_quote.expr,
pass/nested_def_annotation.moduledefs,
pass/nested_if.expr,
pass/nested_if_unindented.expr,
pass/nested_list_comment_in_closure_arg.expr,
pass/nested_parens_in_pattern.expr,
pass/nested_when_comment_in_pat.expr,