mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Fix indentation of record updates and calculation of return indentation
This commit is contained in:
parent
35ffbcd16b
commit
8955f3e124
6 changed files with 57 additions and 10 deletions
|
@ -1,2 +1,2 @@
|
|||
{ i #
|
||||
& }
|
||||
& }
|
|
@ -0,0 +1,2 @@
|
|||
return { #
|
||||
g & } e
|
|
@ -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,
|
||||
],
|
||||
)
|
|
@ -0,0 +1,3 @@
|
|||
return
|
||||
{#
|
||||
g&}e
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue