pub struct SymbolTable {
pub scopes: Vec<Scope>,
pub current_scope_idx: usize,
}Fields§
§scopes: Vec<Scope>§current_scope_idx: usizeImplementations§
Source§impl SymbolTable
impl SymbolTable
pub fn new() -> Self
pub fn enter_scope(&mut self)
pub fn exit_scope(&mut self)
pub fn add_symbol(&mut self, name: String, kind: SymbolKind, span: Span)
pub fn lookup(&self, name: &str) -> Option<&Symbol>
Trait Implementations§
Source§impl Debug for SymbolTable
impl Debug for SymbolTable
Auto Trait Implementations§
impl Freeze for SymbolTable
impl RefUnwindSafe for SymbolTable
impl Send for SymbolTable
impl Sync for SymbolTable
impl Unpin for SymbolTable
impl UnwindSafe for SymbolTable
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