Struct boa::exec::Interpreter
source · Expand description
A Javascript intepreter
Fields
scopes: Vec<Scope>
The scopes
Implementations
sourceimpl Interpreter
impl Interpreter
Trait Implementations
sourceimpl Executor for Interpreter
impl Executor for Interpreter
sourcefn new() -> Interpreter
fn new() -> Interpreter
Make a new execution engine
sourcefn set_global(&mut self, name: String, val: Value) -> Value
fn set_global(&mut self, name: String, val: Value) -> Value
Set a global variable called
name
with the value val
sourcefn get_global(&self, name: String) -> Value
fn get_global(&self, name: String) -> Value
Resolve the global variable
name
sourcefn make_scope(&mut self, this: Value) -> Scope
fn make_scope(&mut self, this: Value) -> Scope
Create a new scope and return it
sourcefn destroy_scope(&mut self) -> Scope
fn destroy_scope(&mut self) -> Scope
Destroy the current scope
sourcefn run(&mut self, expr: &Expr) -> ResultValue
fn run(&mut self, expr: &Expr) -> ResultValue
Run an expression
Auto Trait Implementations
impl !RefUnwindSafe for Interpreter
impl !Send for Interpreter
impl !Sync for Interpreter
impl Unpin for Interpreter
impl !UnwindSafe for Interpreter
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more