mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
Also conservatively check for spaces at the beginning of the pattern
This commit is contained in:
parent
0feed5d57b
commit
a15998872d
5 changed files with 109 additions and 3 deletions
|
@ -0,0 +1,4 @@
|
|||
H : p
|
||||
#
|
||||
s = p
|
||||
d #
|
|
@ -0,0 +1,68 @@
|
|||
@0-13 SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(0),
|
||||
EitherIndex(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-3,
|
||||
@4-11,
|
||||
],
|
||||
space_before: [
|
||||
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
|
||||
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 1 },
|
||||
],
|
||||
space_after: [
|
||||
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
|
||||
Slice<roc_parse::ast::CommentOrNewline> { start: 1, length: 0 },
|
||||
],
|
||||
spaces: [
|
||||
Newline,
|
||||
],
|
||||
type_defs: [
|
||||
Alias {
|
||||
header: TypeHeader {
|
||||
name: @0-1 "H",
|
||||
vars: [],
|
||||
},
|
||||
ann: @2-3 BoundVariable(
|
||||
"p",
|
||||
),
|
||||
},
|
||||
],
|
||||
value_defs: [
|
||||
Body(
|
||||
@7-8 SpaceBefore(
|
||||
Identifier {
|
||||
ident: "s",
|
||||
},
|
||||
[
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
),
|
||||
@10-11 Var {
|
||||
module_name: "",
|
||||
ident: "p",
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
@12-13 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "d",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
)
|
|
@ -0,0 +1,4 @@
|
|||
H:p
|
||||
(#
|
||||
s)=p
|
||||
d#
|
|
@ -289,6 +289,7 @@ mod test_snapshots {
|
|||
pass/ann_effectful_fn.expr,
|
||||
pass/ann_open_union.expr,
|
||||
pass/ann_parens_comments.expr,
|
||||
pass/ann_pattern_comment_before_body.expr,
|
||||
pass/ann_record_pat_with_comment.expr,
|
||||
pass/ann_tag_union_newline_comment.expr,
|
||||
pass/annotate_tuple_func.expr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue