integrated readline
This commit is contained in:
parent
eb85a10415
commit
3c2dde3665
4 changed files with 31 additions and 29 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue