grammar refactoring: build_visitor fixed & visitors tested

This commit is contained in:
ProgramSnail 2023-04-11 13:49:22 +03:00
parent 3c2d496a85
commit e4802896bd
35 changed files with 118128 additions and 91770 deletions

View file

@ -1,22 +1,14 @@
decl flow_control_test : Unit -> Unit
def flow_control_test = {
// if && || a < b
// || a == b
// && b < c
// && c > 10
if ((a < b) || (a == b)) && (b < c)
then IO.print x
elif x < 0
then {
if ((a < b) || (a == b)) && (b < c) then IO.print x
elif x < 0 then {
; ++x
; IO.print y
} else {
return {}
}
while (a > 0) && (!array.is_empty)
do {
while (a > 0) && (!array.is_empty) do {
; --a
; array.pop
}
@ -28,9 +20,7 @@ def flow_control_test = {
; IO.print i
}
for & i & j
in (& 0..y & 0..k)
do { // TODO: decide ??? does it work (like auto zip) ???
for & i & j in (& 0..y & 0..k) do {
; IO.print 1
; IO.print 2
; IO.print 128