file operations in stdlib

This commit is contained in:
Aidan 2020-07-02 19:35:22 -07:00
parent 1802bce604
commit de3e3e5d4e
No known key found for this signature in database
GPG key ID: 327711E983899316
3 changed files with 177 additions and 1 deletions

View file

@ -232,6 +232,34 @@ func GenFuncTable() ast.FuncTable {
TimesCalled: 0,
Args: 1,
},
"fexists": &ast.Function{
Function: fexists,
Name: "file exists",
TimesCalled: 0,
Args: 1,
},
"fread": &ast.Function{
Function: fread,
Name: "read file",
TimesCalled: 0,
Args: 1,
},
"fwrite": &ast.Function{
Function: fwrite,
Name: "write file",
TimesCalled: 0,
Args: 2,
},
"fappend": &ast.Function{
Function: fappend,
Name:"append to file",
TimesCalled: 0,
Args: 2,
},
}
return stdlib