diff options
Diffstat (limited to 'tnslc/tests/complex/if_else.tnsl')
-rw-r--r-- | tnslc/tests/complex/if_else.tnsl | 46 |
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 |