Require boolean in for, if

This commit is contained in:
Krzosa Karol
2022-06-07 13:50:16 +02:00
parent d45ee5ec8a
commit 1a67fe3402
3 changed files with 44 additions and 23 deletions

View File

@@ -5,16 +5,16 @@ pointer_type :: *S64
if_stmt :: (cond: S64): type
CONSTANT :: 10
thing := 10
if i := thing + cond, cond + CONSTANT
if i := thing + cond, cond > CONSTANT
return i + CONSTANT
else if cond - CONSTANT
else if cond < CONSTANT
return i - CONSTANT
else
return CONSTANT
for_stmt :: ()
for i := 0, i + 10, i+=1
for i := 0, i < 10, i+=1
pass
add_10 :: (size: S64): S64