From 033e0fc64415dcaebf15ec26f743e8916fc0aa03 Mon Sep 17 00:00:00 2001 From: lemon Date: Thu, 25 Aug 2022 06:13:58 +0200 Subject: iswitch --- test/1.cff | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/1.cff (limited to 'test/1.cff') 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); + } +} -- cgit v1.2.3