better EOF handling in repl

master
Jordan Orelli 12 years ago
parent 926911a7c6
commit 101ee99edd

@ -337,10 +337,16 @@ func main() {
if prefix {
fmt.Println("(prefix)")
}
if err != nil {
switch err {
case nil:
break
case io.EOF:
fmt.Print("\n")
return
default:
fmt.Println("error: ", err)
continue
}
continue
}
c := make(chan token)
go lexs(string(line) + "\n", c)

Loading…
Cancel
Save