refactor: 重构标准库
This commit is contained in:
parent
d11822f4ba
commit
a8cf93671e
@ -1,7 +1,7 @@
|
||||
module: Math
|
||||
function: main
|
||||
parameter:
|
||||
return_type: int
|
||||
params:
|
||||
returns: int
|
||||
body:
|
||||
Math.factorial(6)
|
||||
return 0
|
||||
@ -9,9 +9,9 @@ module: Math
|
||||
end function
|
||||
|
||||
function: factorial
|
||||
parameter:
|
||||
params:
|
||||
declare n:int
|
||||
return_type: int
|
||||
returns: int
|
||||
body:
|
||||
declare num1:int = 1
|
||||
loop:
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
module: os
|
||||
import: os
|
||||
function: print
|
||||
parameter:
|
||||
params:
|
||||
declare i1: int
|
||||
return_type: void
|
||||
returns: void
|
||||
body:
|
||||
syscall("PRINT",i1)
|
||||
end body
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
function: main
|
||||
parameter:
|
||||
return_type: int
|
||||
params:
|
||||
returns: int
|
||||
body:
|
||||
loop:
|
||||
init:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user