mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-29 02:08:45 +00:00
const -> let
This commit is contained in:
parent
3ae6ed079d
commit
189306df26
33 changed files with 406 additions and 285 deletions
|
|
@ -1,14 +1,20 @@
|
|||
decl flow-control-test : -> \unit
|
||||
def flow-control-test = {
|
||||
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 += 1
|
||||
; \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:
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue