diff options
| author | Edvard Thörnros <edvard.thornros@gmail.com> | 2021-01-11 13:01:22 +0100 |
|---|---|---|
| committer | Edvard Thörnros <edvard.thornros@gmail.com> | 2021-01-11 13:01:22 +0100 |
| commit | e89a65fe2ea7911fa20502818e0af6d702d68be8 (patch) | |
| tree | 4da2952c00681a6faf538781bd3811a980a1f307 /tests | |
| parent | a1e0b7c7fb6e1dc066e61cc302f17466777a488b (diff) | |
| download | sylt-e89a65fe2ea7911fa20502818e0af6d702d68be8.tar.gz | |
Variables and scoping
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/simple.tdy | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/tests/simple.tdy b/tests/simple.tdy index 7822739..9d05b40 100644 --- a/tests/simple.tdy +++ b/tests/simple.tdy @@ -2,9 +2,30 @@ // // asdlkjasl // print 1 + 3 // // OwO -a int := 1 + +// a int := 0 +// b int := 1 +// c int := 3 +// d int := 2 +// +// print a +// print b +// print d +// print c + +a int := 0 +b int := 3 +{ + a int := a + 1 + print a + + { + b int := 2 + print b + } + print b +} +a = 4 print a -print a + a + a -a = 3 + 3 -print a + a + a +// 1, 2, 3, 4 |
