pub struct Scope { /* private fields */ }Implementations§
Source§impl Scope
impl Scope
pub fn new() -> Self
pub fn in_closure(&self) -> bool
pub fn enter_scope(&mut self)
pub fn exit_scope(&mut self)
pub fn enter_function_scope(&mut self)
pub fn exit_function_scope(&mut self)
pub fn resolve_program(&mut self, stmt: &[Stmt]) -> Result<(), String>
pub fn declare_variable(&mut self, name: &str, mutable: bool)
pub fn declare_const(&mut self, name: &str, mutable: bool)
pub fn declare_reference(&mut self, name: &str, mutable: bool)
pub fn declare_enum(&mut self, name: &str) -> Result<(), String>
pub fn declare_variable_in_scope( &mut self, name: &str, mutable: bool, scope_index: usize, ) -> Result<(), String>
pub fn declare_function(&mut self, name: &str) -> Result<(), String>
pub fn declare_module(&mut self, name: &str) -> Result<(), String>
pub fn resolve(&self, name: &str) -> Option<&SymbolInfo>
pub fn mark_as_initialized(&mut self, name: &str) -> Result<(), String>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Scope
impl RefUnwindSafe for Scope
impl Send for Scope
impl Sync for Scope
impl Unpin for Scope
impl UnwindSafe for Scope
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