mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Fix ability with no newline after it
This commit is contained in:
parent
b06afa7bb9
commit
fa4d3e79ec
7 changed files with 119 additions and 51 deletions
|
@ -1,2 +1,2 @@
|
|||
t : (w -> p)ca
|
||||
it
|
||||
t : (w => p)a
|
||||
t
|
|
@ -1,54 +1,59 @@
|
|||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-10,
|
||||
],
|
||||
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-1 Identifier {
|
||||
ident: "t",
|
||||
},
|
||||
@2-10 Tuple {
|
||||
elems: [
|
||||
@3-7 Function(
|
||||
[
|
||||
@3-4 BoundVariable(
|
||||
"w",
|
||||
SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-9,
|
||||
],
|
||||
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-1 Identifier {
|
||||
ident: "t",
|
||||
},
|
||||
@2-9 Tuple {
|
||||
elems: [
|
||||
@3-7 Function(
|
||||
[
|
||||
@3-4 BoundVariable(
|
||||
"w",
|
||||
),
|
||||
],
|
||||
Effectful,
|
||||
@6-7 BoundVariable(
|
||||
"p",
|
||||
),
|
||||
],
|
||||
Effectful,
|
||||
@6-7 BoundVariable(
|
||||
"p",
|
||||
),
|
||||
],
|
||||
ext: Some(
|
||||
@8-9 BoundVariable(
|
||||
"a",
|
||||
),
|
||||
),
|
||||
],
|
||||
ext: Some(
|
||||
@8-10 BoundVariable(
|
||||
"ca",
|
||||
),
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
@11-13 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "it",
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
@10-11 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "t",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
S implements d : J
|
||||
m #
|
||||
D
|
|
@ -0,0 +1,56 @@
|
|||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(0),
|
||||
],
|
||||
regions: [
|
||||
@0-19,
|
||||
],
|
||||
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: [
|
||||
Ability {
|
||||
header: TypeHeader {
|
||||
name: @0-1 "S",
|
||||
vars: [],
|
||||
},
|
||||
loc_implements: @2-12 Implements,
|
||||
members: [
|
||||
AbilityMember {
|
||||
name: @13-14 "d",
|
||||
typ: @15-19 Apply(
|
||||
"",
|
||||
"J",
|
||||
[
|
||||
@18-19 SpaceBefore(
|
||||
BoundVariable(
|
||||
"m",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
value_defs: [],
|
||||
},
|
||||
@21-22 SpaceBefore(
|
||||
Tag(
|
||||
"D",
|
||||
),
|
||||
[
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
|
@ -0,0 +1,3 @@
|
|||
S implements d:J
|
||||
m#
|
||||
D
|
|
@ -493,6 +493,7 @@ mod test_snapshots {
|
|||
pass/newline_in_type_def.expr,
|
||||
pass/newline_inside_empty_list.expr,
|
||||
pass/newline_singleton_list.expr,
|
||||
pass/no_newline_after_implements.expr,
|
||||
pass/nonempty_hosted_header.header,
|
||||
pass/nonempty_package_header.header,
|
||||
pass/nonempty_platform_header.header,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue