added goto
This commit is contained in:
3
tests/goto.expected
Normal file
3
tests/goto.expected
Normal file
@@ -0,0 +1,3 @@
|
||||
3
|
||||
2
|
||||
1
|
||||
12
tests/goto.sl
Normal file
12
tests/goto.sl
Normal 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
1
tests/goto.test
Normal file
@@ -0,0 +1 @@
|
||||
python main.py tests/goto.sl -o /tmp/goto > /dev/null && /tmp/goto
|
||||
Reference in New Issue
Block a user