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