mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 11:52:19 +00:00
Ensure formatted multiline patterns can be parsed
This commit is contained in:
parent
78cda703d9
commit
dfcb7a0c3b
6 changed files with 168 additions and 39 deletions
|
@ -0,0 +1,5 @@
|
|||
1 (0 #
|
||||
f)
|
||||
(0 #
|
||||
f) : f
|
||||
e
|
|
@ -0,0 +1,80 @@
|
|||
SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(2147483648),
|
||||
],
|
||||
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: [],
|
||||
value_defs: [
|
||||
Annotation(
|
||||
@0-1 Apply(
|
||||
@0-1 NumLiteral(
|
||||
"1",
|
||||
),
|
||||
[
|
||||
@2-8 Apply(
|
||||
@3-4 SpaceAfter(
|
||||
NumLiteral(
|
||||
"0",
|
||||
),
|
||||
[
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
),
|
||||
[
|
||||
@7-8 Identifier {
|
||||
ident: "f",
|
||||
},
|
||||
],
|
||||
),
|
||||
@10-16 Apply(
|
||||
@11-12 SpaceAfter(
|
||||
NumLiteral(
|
||||
"0",
|
||||
),
|
||||
[
|
||||
LineComment(
|
||||
"",
|
||||
),
|
||||
],
|
||||
),
|
||||
[
|
||||
@15-16 Identifier {
|
||||
ident: "f",
|
||||
},
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
@18-19 BoundVariable(
|
||||
"f",
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
@20-21 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "e",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
|
@ -0,0 +1,4 @@
|
|||
1((0#
|
||||
)f)((0#
|
||||
)f):f
|
||||
e
|
|
@ -1,4 +1,6 @@
|
|||
1
|
||||
"""
|
||||
""" "^" 2 : A
|
||||
"""
|
||||
"^"
|
||||
2 : A
|
||||
""
|
|
@ -442,6 +442,7 @@ mod test_snapshots {
|
|||
pass/list_patterns.expr,
|
||||
pass/lowest_float.expr,
|
||||
pass/lowest_int.expr,
|
||||
pass/mega_parens_pat.expr,
|
||||
pass/min_parens_number.expr,
|
||||
pass/minimal_app_header.header,
|
||||
pass/minus_minus_block_string.expr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue