pub struct Interpreter {
pub cursor: Cursor<'static>,
actions: Vec<InterpreterAction>,
handler: Handler,
node_builder: NodeBuilder,
breakpoints: Vec<Breakpoint>,
pub watchpoints: Vec<Watchpoint>,
saved_cursors: Vec<Cursor<'static>>,
filename_to_program: HashMap<PathBuf, String>,
parsed_inputs: u32,
}
Expand description
Contains the state of interpretation, in the form of the Cursor
,
as well as information needed to interact with the user, like
the breakpoints.
Fields§
§cursor: Cursor<'static>
§actions: Vec<InterpreterAction>
§handler: Handler
§node_builder: NodeBuilder
§breakpoints: Vec<Breakpoint>
§watchpoints: Vec<Watchpoint>
§saved_cursors: Vec<Cursor<'static>>
§filename_to_program: HashMap<PathBuf, String>
§parsed_inputs: u32
Implementations§
Source§impl Interpreter
impl Interpreter
pub fn new<'a, P: 'a + AsRef<Path>, Q: 'a + AsRef<Path>>( leo_source_files: impl IntoIterator<Item = &'a P>, aleo_source_files: impl IntoIterator<Item = &'a Q>, signer: Address<TestnetV0>, block_height: u32, ) -> Result<Self>
fn get_ast( path: &Path, handler: &Handler, node_builder: &NodeBuilder, ) -> Result<Ast>
fn new_impl( leo_source_files: &mut dyn Iterator<Item = &Path>, aleo_source_files: &mut dyn Iterator<Item = &Path>, signer: Address<TestnetV0>, block_height: u32, ) -> Result<Self>
pub fn save_cursor(&mut self)
Sourcepub fn restore_cursor(&mut self) -> bool
pub fn restore_cursor(&mut self) -> bool
Returns false if there was no saved cursor to restore.
fn get_aleo_program(path: &Path) -> Result<Program<TestnetV0>>
Sourcepub fn update_watchpoints(&mut self) -> Result<bool>
pub fn update_watchpoints(&mut self) -> Result<bool>
Returns true if any watchpoints changed.
pub fn action(&mut self, act: InterpreterAction) -> Result<Option<Value>>
pub fn view_current(&self) -> Option<impl Display>
pub fn view_current_in_context(&self) -> Option<(impl Display, usize, usize)>
fn current_program_and_line(&self) -> Option<(String, usize)>
fn current_span(&self) -> Option<Span>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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