Break on ctrl-D

This commit is contained in:
greg 2015-07-19 17:11:22 -07:00
parent 4f17d5a0dc
commit 3058af4f05

View File

@ -38,6 +38,9 @@ fn repl() {
let line = stdin.lock().read_line(&mut buf);
match line {
Ok(_) => {
if buf.is_empty() {
break;
}
let tokens = tokenize(&buf);
buf.clear();
println!("Tokens: {:?}", tokens);