[][src]Trait boa::exec::Executor

pub trait Executor {
    fn new() -> Self;
fn set_global(&mut self, name: String, val: Value) -> Value;
fn get_global(&self, name: String) -> Value;
fn make_scope(&mut self, this: Value) -> Scope;
fn destroy_scope(&mut self) -> Scope;
fn run(&mut self, expr: &Expr) -> ResultValue; }

An execution engine

Required methods

fn new() -> Self

Make a new execution engine

fn set_global(&mut self, name: String, val: Value) -> Value

Set a global variable called name with the value val

fn get_global(&self, name: String) -> Value

Resolve the global variable name

fn make_scope(&mut self, this: Value) -> Scope

Create a new scope and return it

fn destroy_scope(&mut self) -> Scope

Destroy the current scope

fn run(&mut self, expr: &Expr) -> ResultValue

Run an expression

Loading content...

Implementors

impl Executor for Interpreter[src]

Loading content...