test: 增加例子代码

This commit is contained in:
luke 2025-06-11 22:49:10 +08:00
parent 2047e97655
commit 638eb245d8
2 changed files with 22 additions and 0 deletions

View File

@ -5,6 +5,7 @@ module: Main
body: body:
declare b1: boolean =true declare b1: boolean =true
return b1 return b1
end body end body
end function end function

View File

@ -0,0 +1,21 @@
module: Main
function: main
parameter:
return_type: int
body:
declare b1: boolean = false
loop:
initializer:
declare i:int = 0
condition:
b1
update:
i = i + 1
body:
end body
end loop
return 0
end body
end function
end module