summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2013-03-20 00:40:07 +0000
committerAdrian Thurston <thurston@complang.org>2013-03-20 00:40:07 +0000
commit0a1733ce7d3c8a7f4168c22b09898c9e86de4b3f (patch)
treefebbfca571028a3d4f67b06b5f2b65ae730ea0ec /test
parent391530abf5e11d2327c15f09f728517ff6a7715a (diff)
downloadcolm-0a1733ce7d3c8a7f4168c22b09898c9e86de4b3f.tar.gz
implemented if blocks
Diffstat (limited to 'test')
-rw-r--r--test/ifblock1.lm46
1 files changed, 46 insertions, 0 deletions
diff --git a/test/ifblock1.lm b/test/ifblock1.lm
new file mode 100644
index 00000000..37975299
--- /dev/null
+++ b/test/ifblock1.lm
@@ -0,0 +1,46 @@
+##### LM #####
+if 1
+ print( '1\n' )
+
+if 2 {
+ print( '2\n' )
+}
+
+if 3 {
+ print( '3\n' )
+ print( '4\n' )
+}
+
+if 0
+ print( '0\n' )
+elsif 0
+ print( '0\n' )
+
+if 0
+ print( '0\n' )
+elsif 1
+ print( '5\n' )
+
+if 0
+ print( '0\n' )
+elsif 0
+ print( '0\n' )
+elsif 1
+ print( '6\n' )
+
+if 0
+ print( '0\n' )
+elsif 0
+ print( '0\n' )
+elsif 0
+ print( '0\n' )
+else
+ print( '7\n' )
+##### EXP #####
+1
+2
+3
+4
+5
+6
+7