mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
Force indent on where clause
This commit is contained in:
parent
f08a0012ea
commit
a945fd9c5c
9 changed files with 105 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
|||
2 :
|
||||
r where e
|
||||
implements
|
||||
P
|
||||
implements
|
||||
P
|
||||
u
|
|
@ -1,5 +1,5 @@
|
|||
x :
|
||||
(a where e
|
||||
implements K)
|
||||
implements K)
|
||||
-> Z
|
||||
s
|
|
@ -1,4 +1,4 @@
|
|||
J : [
|
||||
] where e
|
||||
implements T
|
||||
implements T
|
||||
i
|
|
@ -0,0 +1,6 @@
|
|||
T : [
|
||||
] #
|
||||
where e
|
||||
implements
|
||||
T
|
||||
e
|
|
@ -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,
|
||||
],
|
||||
)
|
|
@ -0,0 +1,7 @@
|
|||
T:[
|
||||
]#
|
||||
where
|
||||
e
|
||||
implements
|
||||
T
|
||||
e
|
|
@ -1,5 +1,5 @@
|
|||
1 : (
|
||||
* #
|
||||
where e implements J,
|
||||
where e implements J,
|
||||
)*
|
||||
l
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue