integrated readline

This commit is contained in:
Aidan 2020-06-27 21:27:33 -07:00
parent eb85a10415
commit 3c2dde3665
No known key found for this signature in database
GPG key ID: 327711E983899316
4 changed files with 31 additions and 29 deletions

View file

@ -114,7 +114,19 @@ func GenFuncTable() ast.FuncTable {
TimesCalled: 0,
Args: 1,
},
"exit": &ast.Function{
Function: exit,
Name: "exit",
TimesCalled 0,
Args: 0,
},
}
return stdlib
}
func exit_shell(in *ast.Token, vt ast.VarTable, ft ast.FuncTable) *ast.Token {
os.Exit(0)
return nil // I hope execution doesnt get here
}