interpreter: Fix bug where a break instruction would instead signal a return from subroutine
This commit is contained in:
parent
1bfeeb1755
commit
ae76df9c83
@ -760,7 +760,7 @@ pub mod interpret {
|
||||
impl Interpret for Break {
|
||||
fn interpret(&self, env: &mut Environment) -> IResult<ConValue> {
|
||||
let Self { body } = self;
|
||||
Err(Error::Return(
|
||||
Err(Error::Break(
|
||||
body.as_ref()
|
||||
.map(|body| body.interpret(env))
|
||||
.unwrap_or(Ok(ConValue::Empty))?,
|
||||
|
Loading…
Reference in New Issue
Block a user