aboutsummaryrefslogtreecommitdiff
path: root/test/1.cff
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2022-08-25 06:13:58 +0200
committerlemon <lsof@mailbox.org>2022-08-25 06:13:58 +0200
commit033e0fc64415dcaebf15ec26f743e8916fc0aa03 (patch)
treea851cfa66289e9a3f8f8b3d01a0731606763298b /test/1.cff
parent4f479ac68028a89c8e545f72335642c42a5c4efe (diff)
iswitch
Diffstat (limited to 'test/1.cff')
-rw-r--r--test/1.cff17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/1.cff b/test/1.cff
new file mode 100644
index 0000000..cdda6b9
--- /dev/null
+++ b/test/1.cff
@@ -0,0 +1,17 @@
+import "libc.hff";
+
+extern fn main(argc int) int {
+ switch argc - 1 {
+ case 0, 1;
+ printf("zero or one\n");
+ case -1;
+ printf("???\n");
+ case 2;
+ printf("two");
+ printf("\n");
+ case 7;
+ //empty
+ case else
+ printf("its %d\n", argc);
+ }
+}