pub struct PrecompilerScopeStack {
pub scopes: Vec<PrecompilerScope>,
}Fields§
§scopes: Vec<PrecompilerScope>Implementations§
Source§impl PrecompilerScopeStack
impl PrecompilerScopeStack
pub fn push_scope(&mut self)
pub fn pop_scope(&mut self)
Sourcepub fn increment_realm_index(&mut self)
pub fn increment_realm_index(&mut self)
increment the current scope’s realm index (e.g. inside a remote execution call or function body)
pub fn current_realm_index(&self) -> usize
pub fn add_new_variable( &mut self, name: String, id: usize, kind: VariableShape, ) -> VariableMetadata
pub fn get_variable_and_update_metadata( &self, name: &str, metadata: &mut AstMetadata, ) -> Result<usize, CompilerError>
pub fn set_variable(&mut self, name: String, id: usize)
pub fn get_active_scope(&self) -> &PrecompilerScope
pub fn get_active_scope_mut(&mut self) -> &mut PrecompilerScope
pub fn get_variable(&self, name: &str) -> Option<usize>
pub fn has_variable(&self, name: &str) -> bool
pub fn metadata<'a>( &self, name: &str, metadata: &'a AstMetadata, ) -> Option<&'a VariableMetadata>
pub fn variable_kind( &self, name: &str, metadata: &AstMetadata, ) -> Option<VariableShape>
Trait Implementations§
Source§impl Clone for PrecompilerScopeStack
impl Clone for PrecompilerScopeStack
Source§fn clone(&self) -> PrecompilerScopeStack
fn clone(&self) -> PrecompilerScopeStack
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 PrecompilerScopeStack
impl Debug for PrecompilerScopeStack
Auto Trait Implementations§
impl Freeze for PrecompilerScopeStack
impl RefUnwindSafe for PrecompilerScopeStack
impl Send for PrecompilerScopeStack
impl Sync for PrecompilerScopeStack
impl Unpin for PrecompilerScopeStack
impl UnwindSafe for PrecompilerScopeStack
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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