mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2026-01-02 20:28:18 +00:00
changes for new grammar, fixes
This commit is contained in:
parent
91f9affadc
commit
3106a64949
35 changed files with 605 additions and 550 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue