MVP grade arithmetic routines
This commit is contained in:
parent
6a66c00ae5
commit
9301c77573
2 changed files with 210 additions and 0 deletions
|
|
@ -37,6 +37,34 @@ func GenFuncTable() ast.FuncTable {
|
|||
TimesCalled: 0,
|
||||
Args: -1,
|
||||
},
|
||||
|
||||
"+": &ast.Function{
|
||||
Function: add,
|
||||
Name: "add",
|
||||
TimesCalled: 0,
|
||||
Args: -1,
|
||||
},
|
||||
|
||||
"-": &ast.Function{
|
||||
Function: sub,
|
||||
Name: "sub",
|
||||
TimesCalled: 0,
|
||||
Args: -1,
|
||||
},
|
||||
|
||||
"*": &ast.Function{
|
||||
Function: mult,
|
||||
Name: "mult",
|
||||
TimesCalled: 0,
|
||||
Args: -1,
|
||||
},
|
||||
|
||||
"div": &ast.Function{
|
||||
Function: div,
|
||||
Name: "div",
|
||||
TimesCalled: 0,
|
||||
Args: -1,
|
||||
},
|
||||
}
|
||||
|
||||
return stdlib
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue