changes for new grammar, fixes

This commit is contained in:
ProgramSnail 2023-06-03 19:01:03 +03:00
parent 91f9affadc
commit 3106a64949
35 changed files with 605 additions and 550 deletions

View file

@ -1,28 +1,28 @@
decl flow_control_test : -> Unit
def flow_control_test = {
if (a < b ||. a == b) && (b < c) then IO.print: x
decl flow-control-test : -> \unit
def flow-control-test = {
if (a < b ||. a == b) && (b < c) then \io..print: x
elif x < 0 then {
; x += 1
; IO.print: y
; \io..print: y
} else {
return {}
}
while (a > 0) && not: (array.is_empty:) do {
while (a > 0) && not: (array..is-empty:) do {
; a -= 1
; 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 {