test: 添加 Demo16

This commit is contained in:
Luke 2025-07-28 17:35:38 +08:00
parent 9132c79c54
commit 83b2122bd7
2 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,22 @@
module: Main
import: os
function: main
return_type: int
body:
loop:
init:
declare i:int = 1
cond:
i <= 10
step:
i = i + 1
body:
if i % 2 == 0 then
print(i)
end if
end body
end loop
return 0
end body
end function
end module

View File

@ -0,0 +1,11 @@
module: os
import: os
function: print
parameter:
declare i1: int
return_type: void
body:
syscall("PRINT",i1)
end body
end function
end module