From 32fa47b52b03f4ae84bc773bad785cf77334ae78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edvard=20Th=C3=B6rnros?= Date: Tue, 12 Jan 2021 18:49:11 +0100 Subject: WIP for-loop --- tests/simple.tdy | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) (limited to 'tests') diff --git a/tests/simple.tdy b/tests/simple.tdy index 3fe05a4..d07aad7 100644 --- a/tests/simple.tdy +++ b/tests/simple.tdy @@ -13,12 +13,28 @@ // print d // print c -a int := 2 -if a == 0 { - print "123" -} else if a == 1 { - print "BCD" -} else { - print "ABC" + +for a := 0, a >= 0, a = a - 1 { + if a == 2 { + continue + } + print a +} + +for a := 0, a >= 0, a = a - 1 { + if a == 2 { + continue + } + print a +} + +a = 0 + +fiv a in something { } + +something.each((x) -> { + +} + // 1, 2, 3, 4 -- cgit v1.2.1