mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 10:49:54 +00:00
fix: set the block begin when the it's evaluated
This commit is contained in:
parent
d828801484
commit
87cb7c3af5
1 changed files with 4 additions and 1 deletions
|
@ -817,7 +817,10 @@ pub trait Runnable: Sized + Default + New {
|
|||
continue;
|
||||
}
|
||||
match instance.eval(mem::take(&mut vm.codes)) {
|
||||
Ok(out) if out.is_empty() => continue,
|
||||
Ok(out) if out.is_empty() => {
|
||||
instance.input().set_block_begin();
|
||||
continue;
|
||||
}
|
||||
Ok(out) => {
|
||||
output.write_all((out + "\n").as_bytes()).unwrap();
|
||||
output.flush().unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue