need to flush stdout for printing
This commit is contained in:
parent
a46ede9395
commit
b0655d7cab
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user