Boa 0.10.0

Boa is a Javascript lexer, parser and Just-in-Time compiler written in Rust. Currently, it has support for some of the language.
Documentation
use super::{Context, Executable, InterpreterState};
use crate::{
    syntax::ast::node::{Break, Continue},
    Result, Value,
};

#[cfg(test)]
mod tests;

impl Executable for Break {
    fn run(&self, interpreter: &mut Context) -> Result<Value> {
        interpreter
            .executor()
            .set_current_state(InterpreterState::Break(self.label().map(Box::from)));

        Ok(Value::undefined())
    }
}

impl Executable for Continue {
    fn run(&self, interpreter: &mut Context) -> Result<Value> {
        interpreter
            .executor()
            .set_current_state(InterpreterState::Continue(self.label().map(Box::from)));

        Ok(Value::undefined())
    }
}