diff options
| author | Martial Simon <msimon_fr@hotmail.com> | 2025-09-15 01:07:58 +0200 |
|---|---|---|
| committer | Martial Simon <msimon_fr@hotmail.com> | 2025-09-15 01:07:58 +0200 |
| commit | 967be9e750221ab2ab783f95df79bb26d290a45e (patch) | |
| tree | 6802900a5e975f9f68b169f0f503f040056d6952 /tiger-compiler/tests/good/escapes_various.tig | |
Diffstat (limited to 'tiger-compiler/tests/good/escapes_various.tig')
| -rw-r--r-- | tiger-compiler/tests/good/escapes_various.tig | 19 |
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 |
