MVP grade arithmetic routines

This commit is contained in:
Aidan 2020-06-26 20:17:45 -07:00
parent 6a66c00ae5
commit 9301c77573
No known key found for this signature in database
GPG key ID: 327711E983899316
2 changed files with 210 additions and 0 deletions

View file

@ -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