Main program - Reset REPL buffer before reading
This commit is contained in:
parent
6fad0fdfc4
commit
4e9e566a4f
1 changed files with 1 additions and 0 deletions
|
@ -30,6 +30,7 @@ fn run_prompt() {
|
|||
loop {
|
||||
print!("slox> ");
|
||||
stdout.flush().unwrap();
|
||||
buffer.clear();
|
||||
let n_read = stdin
|
||||
.read_line(&mut buffer)
|
||||
.expect("Failed to read from stdin");
|
||||
|
|
Loading…
Reference in a new issue