test: 增加例子代码
This commit is contained in:
parent
2047e97655
commit
638eb245d8
@ -4,6 +4,7 @@ module: Main
|
||||
return_type: boolean
|
||||
body:
|
||||
declare b1: boolean =true
|
||||
|
||||
|
||||
return b1
|
||||
end body
|
||||
|
||||
21
playground/Demo5/Main.snow
Normal file
21
playground/Demo5/Main.snow
Normal 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
|
||||
Loading…
x
Reference in New Issue
Block a user