added type casts

This commit is contained in:
Aidan 2020-07-18 00:22:43 -07:00
parent 77ce00970f
commit 8278430882
No known key found for this signature in database
GPG key ID: 327711E983899316
4 changed files with 72 additions and 1 deletions

View file

@ -77,7 +77,28 @@ func GenFuncTable() ast.FuncTable {
Args: 1,
},
"...": &ast.Function{
"bool": &ast.Function{
Function: bool_cast,
Name: "bool",
TimesCalled: 0,
Args: 1,
},
"string": &ast.Function{
Function: str_cast,
Name: "string",
TimesCalled: 0,
Args: 1,
},
"number": &ast.Function{
Function: num_cast,
Name: "number",
TimesCalled: 0,
Args: 1,
},
"...": &ast.Function{
Function: expand,
Name: "...",
TimesCalled: 0,