mirror of
https://github.com/roc-lang/roc.git
synced 2025-11-01 13:34:15 +00:00
Handle multiline string at the start of a pattern
This commit is contained in:
parent
10e7e24184
commit
0d182fbd28
6 changed files with 104 additions and 1 deletions
|
|
@ -0,0 +1,7 @@
|
|||
8
|
||||
(
|
||||
"""
|
||||
"""
|
||||
"")
|
||||
f : C
|
||||
U
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
@0-17 SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(2147483648),
|
||||
EitherIndex(2147483649),
|
||||
],
|
||||
regions: [
|
||||
@0-1,
|
||||
@2-15,
|
||||
],
|
||||
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: [],
|
||||
value_defs: [
|
||||
Stmt(
|
||||
@0-1 Num(
|
||||
"8",
|
||||
),
|
||||
),
|
||||
Annotation(
|
||||
@3-11 Apply(
|
||||
@3-11 Apply(
|
||||
@3-9 StrLiteral(
|
||||
Block(
|
||||
[],
|
||||
),
|
||||
),
|
||||
[
|
||||
@9-11 StrLiteral(
|
||||
PlainLine(
|
||||
"",
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
[
|
||||
@12-13 Identifier {
|
||||
ident: "f",
|
||||
},
|
||||
],
|
||||
),
|
||||
@14-15 Apply(
|
||||
"",
|
||||
"C",
|
||||
[],
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
@16-17 SpaceBefore(
|
||||
Tag(
|
||||
"U",
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
8
|
||||
("""""""")f:C
|
||||
U
|
||||
|
|
@ -494,6 +494,7 @@ mod test_snapshots {
|
|||
pass/multiline_backpassing.expr,
|
||||
pass/multiline_binop_when_with_comments.expr,
|
||||
pass/multiline_str_after_newlines_in_pat.expr,
|
||||
pass/multiline_str_and_str_in_alias.expr,
|
||||
pass/multiline_str_apply_in_parens_pat.expr,
|
||||
pass/multiline_str_crazyness.expr,
|
||||
pass/multiline_str_in_backpassing_pats.expr,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue