Trait ScopeManager

Source
pub trait ScopeManager {
    // Required methods
    fn enter_scope(&mut self);
    fn exit_scope(&mut self);
    fn define_symbol(
        &mut self,
        name: String,
        kind: SymbolKind,
        type_id: TypeId,
        is_mutable: bool,
    ) -> Result<(), String>;
}
Expand description

Trait for scope management operations

This trait abstracts scope lifecycle management, enabling different scoping strategies and easier testing.

Required Methods§

Source

fn enter_scope(&mut self)

Enter a new scope

Source

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>

Define a symbol in the current scope

Implementors§