added goto

This commit is contained in:
IgorCielniak
2026-01-09 11:10:18 +01:00
parent 8466664637
commit 0acf5555a8
4 changed files with 52 additions and 0 deletions

3
tests/goto.expected Normal file
View File

@@ -0,0 +1,3 @@
3
2
1

12
tests/goto.sl Normal file
View File

@@ -0,0 +1,12 @@
import stdlib/stdlib.sl
import stdlib/io.sl
word main
3
label loop
dup puti cr
1 -
dup 0 >
if goto loop end
drop
end

1
tests/goto.test Normal file
View File

@@ -0,0 +1 @@
python main.py tests/goto.sl -o /tmp/goto > /dev/null && /tmp/goto