diff options
author | Bad Diode <bd@badd10de.dev> | 2024-06-18 19:12:13 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2024-06-18 19:12:13 +0200 |
commit | a0068318895ff8dea6d3c3f0db381fbca83e3f40 (patch) | |
tree | 200a987c8ac3eb10cc1d6400328baeee986837a7 /tests | |
parent | c80020d23599a9ea7b60f83449dbb93762ca9770 (diff) | |
download | bdl-a0068318895ff8dea6d3c3f0db381fbca83e3f40.tar.gz bdl-a0068318895ff8dea6d3c3f0db381fbca83e3f40.zip |
Add parsing for match-case statements
Diffstat (limited to 'tests')
-rw-r--r-- | tests/conditionals.bad | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/conditionals.bad b/tests/conditionals.bad index 45e1bd2..71d49c3 100644 --- a/tests/conditionals.bad +++ b/tests/conditionals.bad | |||
@@ -17,3 +17,11 @@ else 8 | |||
17 | if true != false { | 17 | if true != false { |
18 | let a = "yo" | 18 | let a = "yo" |
19 | } | 19 | } |
20 | |||
21 | ; Match cases should only apply to literal values, for example `case 1 + 2` | ||
22 | ; isn't allowed. | ||
23 | match 4 * 2 { | ||
24 | case 8 = "hello" | ||
25 | case 9 = "world" | ||
26 | case = "what" | ||
27 | } | ||