summaryrefslogtreecommitdiff
path: root/tiger-compiler/tests/good/escapes_various.tig
diff options
context:
space:
mode:
Diffstat (limited to 'tiger-compiler/tests/good/escapes_various.tig')
-rw-r--r--tiger-compiler/tests/good/escapes_various.tig19
1 files changed, 19 insertions, 0 deletions
diff --git a/tiger-compiler/tests/good/escapes_various.tig b/tiger-compiler/tests/good/escapes_various.tig
new file mode 100644
index 0000000..65689bf
--- /dev/null
+++ b/tiger-compiler/tests/good/escapes_various.tig
@@ -0,0 +1,19 @@
+let
+ var i := 69
+
+ function do_something() = let var a := 1 in a := a + 1 end
+ function do_something_else() = print_int(1 <> 2)
+
+ function print_a_number(k: int) = print_int(k)
+ function conditional_print(value: int) = (print_a_number(value); print_a_number(i))
+
+ function main_callback() = (
+ do_something();
+ print_a_number(i);
+ do_something_else();
+ print("\n");
+ conditional_print(9)
+ )
+in
+ main_callback()
+end