Force newlines after multi-line tuple pattern elements

This commit is contained in:
Joshua Warner 2024-12-11 19:44:17 -08:00
parent 0cc16b0d2c
commit 8b3abafa08
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
6 changed files with 99 additions and 6 deletions

View file

@ -0,0 +1,79 @@
@0-19 SpaceAfter(
Defs(
Defs {
tags: [
EitherIndex(2147483648),
],
regions: [
@0-17,
],
space_before: [
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
],
space_after: [
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
],
spaces: [],
type_defs: [],
value_defs: [
Annotation(
@0-15 Tuple(
[
@1-7 Apply(
@2-3 SpaceAfter(
NumLiteral(
"0",
),
[
LineComment(
"",
),
],
),
[
@6-7 Identifier {
ident: "e",
},
],
),
@8-14 Apply(
@9-10 SpaceAfter(
NumLiteral(
"0",
),
[
LineComment(
"",
),
],
),
[
@13-14 Identifier {
ident: "p",
},
],
),
],
),
@16-17 BoundVariable(
"f",
),
),
],
},
@18-19 SpaceBefore(
Var {
module_name: "",
ident: "t",
},
[
Newline,
],
),
),
[
LineComment(
"",
),
],
)

View file

@ -0,0 +1,4 @@
((0#
)e,(0#
)p):f
t#

View file

@ -376,6 +376,7 @@ mod test_snapshots {
pass/defs_suffixed_middle_extra_indents.moduledefs,
pass/destructure_tag_assignment.expr,
pass/docs.expr,
pass/double_parens_comment_tuple_pat.expr,
pass/double_space_before.expr,
pass/effectful_closure_statements.expr,
pass/empty_app_header.header,