pub struct Interpreter {
pub debug_breakpoint_check: Option<DebugBreakpointCheck>,
pub debug_breakpoint_handler: Option<DebugBreakpointHandler>,
/* private fields */
}Expand description
Pascal interpreter
Fields§
§debug_breakpoint_check: Option<DebugBreakpointCheck>When set, called before user procedure; if returns true, handler is invoked
debug_breakpoint_handler: Option<DebugBreakpointHandler>Implementations§
Source§impl Interpreter
impl Interpreter
Sourcepub fn current_scope(&self) -> &Scope
pub fn current_scope(&self) -> &Scope
Get the current (innermost) scope for testing purposes
Sourcepub fn get_variable_value(&self, name: &str) -> Option<Value>
pub fn get_variable_value(&self, name: &str) -> Option<Value>
Get a variable value for testing purposes
Sourcepub fn run_program(&mut self, program: &Program) -> Result<()>
pub fn run_program(&mut self, program: &Program) -> Result<()>
Run a parsed program
Auto Trait Implementations§
impl Freeze for Interpreter
impl !RefUnwindSafe for Interpreter
impl !Send for Interpreter
impl !Sync for Interpreter
impl Unpin for Interpreter
impl UnsafeUnpin 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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more