retrofit call functions for new eval alg

This commit is contained in:
Aidan 2020-06-29 19:15:00 -07:00
parent ea99142b3a
commit 2ae1145a50
No known key found for this signature in database
GPG key ID: 327711E983899316
9 changed files with 384 additions and 25 deletions

View file

@ -143,6 +143,59 @@ func GenFuncTable() ast.FuncTable {
TimesCalled: 0,
Args: 1,
},
"l": &ast.Function{
Function: call,
Name: "call",
TimesCalled: 0,
Args: -1,
},
"bg": &ast.Function{
Function: bgcall,
Name: "background call",
TimesCalled: 0,
Args: -1,
},
"fg": &ast.Function{
Function: fg,
Name: "foreground",
TimesCalled: 0,
Args: 0,
},
"$": &ast.Function{
Function: read_cmd,
Name: "read cmd",
TimesCalled: 0,
Args: -1,
},
"?": &ast.Function{
Function: get_exit,
Name:"get exit code",
TimesCalled: 0,
Args: 0,
},
/*
USE NATIVE KILL COMMAND.
"kill": &ast.Function{
Function: kill,
Name: "kill job",
TimesCalled: 0,
Args: 1,
},
*/
"jobs": &ast.Function{
Function: jobs,
Name: "list jobs",
TimesCalled: 0,
Args: 0,
},
}
return stdlib