summaryrefslogtreecommitdiff
path: root/tnslc/tests/complex/if_else.tnsl
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2023-02-16 05:14:31 -0500
committerKyle Gunger <kgunger12@gmail.com>2023-02-16 05:14:31 -0500
commit09df1bb48823631228af3df647111af1eebc854b (patch)
treeef091fc942b00b224f7d66aacb0c3db0ab4d490c /tnslc/tests/complex/if_else.tnsl
parentc94edbe007910755087e71cbb1a6a349d75e9b85 (diff)
Collapse tnslc into a single file
Diffstat (limited to 'tnslc/tests/complex/if_else.tnsl')
-rw-r--r--tnslc/tests/complex/if_else.tnsl46
1 files changed, 46 insertions, 0 deletions
diff --git a/tnslc/tests/complex/if_else.tnsl b/tnslc/tests/complex/if_else.tnsl
new file mode 100644
index 0000000..d965e6b
--- /dev/null
+++ b/tnslc/tests/complex/if_else.tnsl
@@ -0,0 +1,46 @@
+/; main [int]
+ /; if ()
+
+ ;/
+
+ /; if ()
+
+ ;; else
+
+ ;/
+
+ /; if ()
+
+ ;//; else
+
+ ;/
+
+ /; if ()
+
+ ;; else if ()
+
+ ;/
+
+ /; if () []
+ ;; else if () []
+ ;; else []
+ ;/
+
+ /; if () []
+ ;; if () []
+ ;; else []
+ ;/
+
+ /; if () []
+ ;; if () []
+ ;; else if () []
+ ;; else []
+ ;/
+
+ int i = 0
+
+ # Short if syntax for variable declaration
+ i = if (i < 1) [7] else [9]
+
+ ;return 0
+;/ \ No newline at end of file