Break on ctrl-D
This commit is contained in:
parent
4f17d5a0dc
commit
3058af4f05
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user