test: 添加 Demo18 项目

This commit is contained in:
Luke 2025-07-29 11:21:09 +08:00
parent 7395256b5a
commit 2f16dd2749
2 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,43 @@
module: Main
import: os
function: main
return_type: int
body:
loop:
init:
declare i:int = 1
cond:
i <= 5
step:
i = i + 1
body:
if i % 2 == 0 then
continue
end if
if i > 3 then
break
end if
loop:
init:
declare j:int = 1
cond:
j <= 5
step:
j = j + 1
body:
if j == 4 then
break
end if
if j % 2 == 0 then
continue
end if
print(i)
print(j)
end body
end loop
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