Force indent on where clause

This commit is contained in:
Joshua Warner 2025-01-11 22:02:25 -08:00
parent f08a0012ea
commit a945fd9c5c
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
9 changed files with 105 additions and 6 deletions

View file

@ -1,5 +1,5 @@
2 :
r where e
implements
P
implements
P
u

View file

@ -1,5 +1,5 @@
x :
(a where e
implements K)
implements K)
-> Z
s

View file

@ -1,4 +1,4 @@
J : [
] where e
implements T
implements T
i

View file

@ -0,0 +1,6 @@
T : [
] #
where e
implements
T
e

View file

@ -0,0 +1,85 @@
@0-31 SpaceAfter(
Defs(
Defs {
tags: [
EitherIndex(0),
],
regions: [
@0-29,
],
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: [
Alias {
header: TypeHeader {
name: @0-1 "T",
vars: [],
},
ann: @2-29 Where(
@2-5 SpaceAfter(
TagUnion {
ext: None,
tags: Collection {
items: [],
final_comments: [
Newline,
],
},
},
[
LineComment(
"",
),
],
),
[
@15-29 ImplementsClause {
var: @15-16 SpaceBefore(
SpaceAfter(
"e",
[
Newline,
],
),
[
Newline,
],
),
abilities: [
@28-29 SpaceBefore(
Apply(
"",
"T",
[],
),
[
Newline,
],
),
],
},
],
),
},
],
value_defs: [],
},
@30-31 SpaceBefore(
Var {
module_name: "",
ident: "e",
},
[
Newline,
],
),
),
[
Newline,
],
)

View file

@ -0,0 +1,7 @@
T:[
]#
where
e
implements
T
e

View file

@ -1,5 +1,5 @@
1 : (
* #
where e implements J,
where e implements J,
)*
l

View file

@ -799,6 +799,7 @@ mod test_snapshots {
pass/where_clause_non_function.expr,
pass/where_clause_on_newline.expr,
pass/where_ident.expr,
pass/where_implements_lots_of_newlines.expr,
pass/where_in_tuple_after_comment.expr,
pass/where_in_tuple_plain.expr,
pass/zero_float.expr,