diff options
Diffstat (limited to 'boot/tests/parse/conditionals.cskt')
| -rw-r--r-- | boot/tests/parse/conditionals.cskt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/boot/tests/parse/conditionals.cskt b/boot/tests/parse/conditionals.cskt new file mode 100644 index 0000000..bf314fa --- /dev/null +++ b/boot/tests/parse/conditionals.cskt @@ -0,0 +1,20 @@ + +<<< + +if x == 5 { + return 1 +} else if x == 4 { + return 2 +} else { + return 0 +} + +>>> + +(conditional (when (expr (binary == (expr (name x)) (expr 5)))) (block + (return (expr 1)) +) (when (expr (binary == (expr (name x)) (expr 4)))) (block + (return (expr 2)) +) (always) (block + (return (expr 0)) +)) |
