From 09df1bb48823631228af3df647111af1eebc854b Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Thu, 16 Feb 2023 05:14:31 -0500 Subject: Collapse tnslc into a single file --- tnslc/tests/complex/if_else.tnsl | 46 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 tnslc/tests/complex/if_else.tnsl (limited to 'tnslc/tests/complex/if_else.tnsl') 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 -- cgit v1.2.3