mirror of
https://github.com/roc-lang/roc.git
synced 2025-11-02 05:48:17 +00:00
Update parser tests
This commit is contained in:
parent
d67d118e61
commit
2013e308f7
2 changed files with 34 additions and 4 deletions
|
|
@ -40,9 +40,37 @@ When(
|
|||
],
|
||||
),
|
||||
@43-48 SpaceBefore(
|
||||
SpaceAfter(
|
||||
StrLiteral(
|
||||
PlainLine(
|
||||
"bar",
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
@51-56 StrLiteral(
|
||||
PlainLine(
|
||||
"baz",
|
||||
),
|
||||
),
|
||||
],
|
||||
value: @60-61 Num(
|
||||
"2",
|
||||
),
|
||||
guard: None,
|
||||
},
|
||||
WhenBranch {
|
||||
patterns: [
|
||||
@63-70 SpaceBefore(
|
||||
StrLiteral(
|
||||
PlainLine(
|
||||
"bar",
|
||||
"stuff",
|
||||
),
|
||||
),
|
||||
[
|
||||
|
|
@ -50,8 +78,8 @@ When(
|
|||
],
|
||||
),
|
||||
],
|
||||
value: @52-53 Num(
|
||||
"2",
|
||||
value: @74-75 Num(
|
||||
"4",
|
||||
),
|
||||
guard: None,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
when x is
|
||||
"blah" | "blop" -> 1
|
||||
"foo" |
|
||||
"bar" -> 2
|
||||
"bar"
|
||||
|"baz" -> 2
|
||||
"stuff" -> 4
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue