main: Cosmetics

This commit is contained in:
Cheer Xiao 2013-09-18 22:58:50 +08:00
parent cd43635cd3
commit 70534cd80a

View File

@ -26,6 +26,7 @@ func main() {
if err != nil {
panic(err)
}
lr := ed.ReadLine("das> ")
err = ed.Cleanup()
if err != nil {
@ -38,8 +39,8 @@ func main() {
} else if lr.Err != nil {
panic(lr.Err)
}
line := lr.Line
tree, err := parse.Parse(name, line, false)
tree, err := parse.Parse(name, lr.Line, false)
if err != nil {
fmt.Println("Parser error:", err)
continue
@ -47,7 +48,6 @@ func main() {
cmd := tree.Root.(*parse.ListNode).Nodes[0].(*parse.CommandNode)
pid, err := eval.ExecCommand(cmd)
if err != nil {
fmt.Println(err)
continue