Update parser tests

This commit is contained in:
Richard Feldman 2022-07-13 22:02:56 -04:00
parent d67d118e61
commit 2013e308f7
No known key found for this signature in database
GPG key ID: 7E4127D1E4241798
2 changed files with 34 additions and 4 deletions

View file

@ -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,
},

View file

@ -1,4 +1,6 @@
when x is
"blah" | "blop" -> 1
"foo" |
"bar" -> 2
"bar"
|"baz" -> 2
"stuff" -> 4