need to flush stdout for printing

This commit is contained in:
greg 2017-01-11 22:32:12 -08:00
parent a46ede9395
commit b0655d7cab

View File

@ -160,6 +160,10 @@ impl<'a> Evaluator<'a> {
match side_effect { match side_effect {
Print(s) => { Print(s) => {
write!(self.stdout, "{}\n", s).unwrap(); write!(self.stdout, "{}\n", s).unwrap();
match self.stdout.flush() {
Ok(_) => (),
Err(_) => println!("Could not flush stdout"),
};
} }
AddBinding(var, value) => { AddBinding(var, value) => {
self.add_binding((*var).clone(), value); self.add_binding((*var).clone(), value);