Fix indentation of record updates and calculation of return indentation

This commit is contained in:
Joshua Warner 2025-01-03 17:50:29 -08:00
parent 35ffbcd16b
commit 8955f3e124
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
6 changed files with 57 additions and 10 deletions

View file

@ -0,0 +1,36 @@
@0-15 SpaceAfter(
Return(
@0-15 SpaceBefore(
Apply(
@8-14 RecordUpdate {
update: @11-12 SpaceBefore(
Var {
module_name: "",
ident: "g",
},
[
LineComment(
"",
),
],
),
fields: [],
},
[
@14-15 Var {
module_name: "",
ident: "e",
},
],
Space,
),
[
Newline,
],
),
None,
),
[
Newline,
],
)

View file

@ -667,6 +667,7 @@ mod test_snapshots {
pass/return_multiline.expr,
pass/return_only_statement.expr,
pass/return_parens_comments.expr,
pass/return_record_update_comment_empty_fields.expr,
pass/return_then_nested_parens.expr,
pass/return_with_after.expr,
pass/separate_defs.moduledefs,