pub struct Interpreter {
pub call_frames: Vec<CallFrame>,
pub globals: Rc<RefCell<HashMap<String, Rc<RefCell<Value>>>>>,
pub global_path: Option<String>,
}Fields§
§call_frames: Vec<CallFrame>§globals: Rc<RefCell<HashMap<String, Rc<RefCell<Value>>>>>§global_path: Option<String>Implementations§
Source§impl Interpreter
impl Interpreter
pub fn with_global_path(self, path: Option<String>) -> Self
Source§impl Interpreter
impl Interpreter
pub fn path(&self) -> Option<String>
pub fn call( &mut self, function: &Rc<Function>, args: Vec<Value>, dst: Option<Location>, )
pub fn return_call(&mut self, src: Option<Source>) -> Option<Value>
pub fn call_kind( &mut self, kind: FunctionKind, args: Vec<Value>, dst: Option<Location>, pos: Position, ) -> Result<(), Located<RunTimeError>>
pub fn step(&mut self) -> Result<Option<Value>, Located<RunTimeError>>
pub fn run(&mut self) -> Result<Option<Value>, Located<RunTimeError>>
Trait Implementations§
Source§impl Clone for Interpreter
impl Clone for Interpreter
Source§fn clone(&self) -> Interpreter
fn clone(&self) -> Interpreter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Interpreter
impl Debug for Interpreter
Auto Trait Implementations§
impl Freeze for Interpreter
impl !RefUnwindSafe for Interpreter
impl !Send for Interpreter
impl !Sync for Interpreter
impl Unpin for Interpreter
impl !UnwindSafe for Interpreter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more