pub struct ContextScopeManager<'a> {
context: &'a mut CompilationContext,
}
Expand description
Context-based scope manager that implements scope lifecycle operations using the compilation context’s scoping mechanisms.
This implementation provides the standard scope management behavior by delegating to the compilation context’s scope operations.
Fields§
§context: &'a mut CompilationContext
Implementations§
Source§impl<'a> ContextScopeManager<'a>
impl<'a> ContextScopeManager<'a>
Sourcepub fn new(context: &'a mut CompilationContext) -> Self
pub fn new(context: &'a mut CompilationContext) -> Self
Create a new context-based scope manager
§Arguments
context
- The compilation context to manage scopes for
Trait Implementations§
Source§impl ScopeManager for ContextScopeManager<'_>
impl ScopeManager for ContextScopeManager<'_>
Source§fn enter_scope(&mut self)
fn enter_scope(&mut self)
Enter a new scope
Source§fn exit_scope(&mut self)
fn exit_scope(&mut self)
Exit the current scope
Source§fn define_symbol(
&mut self,
name: String,
kind: SymbolKind,
type_id: TypeId,
is_mutable: bool,
) -> Result<(), String>
fn define_symbol( &mut self, name: String, kind: SymbolKind, type_id: TypeId, is_mutable: bool, ) -> Result<(), String>
Define a symbol in the current scope
Auto Trait Implementations§
impl<'a> Freeze for ContextScopeManager<'a>
impl<'a> RefUnwindSafe for ContextScopeManager<'a>
impl<'a> Send for ContextScopeManager<'a>
impl<'a> Sync for ContextScopeManager<'a>
impl<'a> Unpin for ContextScopeManager<'a>
impl<'a> !UnwindSafe for ContextScopeManager<'a>
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