examples/interpret: Multi-line input support

This commit is contained in:
John 2023-10-26 22:33:31 -05:00
parent b906775006
commit f3aad36f32

View File

@ -43,11 +43,11 @@ fn take_stdin() -> Result<(), Box<dyn Error>> {
} }
1 => { 1 => {
let _ = run(&buf, &mut interpreter).map_err(|e| eprintln!("{e}")); let _ = run(&buf, &mut interpreter).map_err(|e| eprintln!("{e}"));
print!("\n{PROMPT}");
buf.clear(); buf.clear();
} }
_ => (), _ => print!(". "),
} }
print!("{PROMPT}");
stdout().flush()?; stdout().flush()?;
} }
} else { } else {