type_check_visitor fixes, array access and function call syntax change

This commit is contained in:
ProgramSnail 2023-05-07 09:25:38 +03:00
parent f7080ba856
commit c1dec6a0d1
16 changed files with 426 additions and 311 deletions

View file

@ -1,29 +1,29 @@
decl flow_control_test : Unit -> Unit
def flow_control_test = {
if ((a < b) || (a == b)) && (b < c) then IO.print x
if ((a < b) || (a == b)) && (b < c) then IO.print: x
elif x < 0 then {
; ++x
; IO.print y
; IO.print: y
} else {
return {}
}
while (a > 0) && (!array.is_empty ()) do {
while (a > 0) && (!array.is_empty:) do {
; --a
; array->pop
; array.pop:
}
while x < 10 do
x += x + 3
for i in 0..y do {
; IO.print i
; IO.print: i
}
for & i & j in (& 0..y & 0..k) do {
; IO.print 1
; IO.print 2
; IO.print 128
; IO.print: 1
; IO.print: 2
; IO.print: 128
}
loop {