SymbolTable

Trait SymbolTable 

Source
pub trait SymbolTable {
    type SymbolIter: Iterator<Item = LocalSymbol>;

    // Required method
    fn symbols(
        &self,
        source_manager: Arc<dyn SourceManager>,
    ) -> Self::SymbolIter;
}
Expand description

This trait abstracts over any type which acts as a symbol table, e.g. a crate::ast::Module.

Required Associated Types§

Source

type SymbolIter: Iterator<Item = LocalSymbol>

The concrete iterator type for the container.

Required Methods§

Source

fn symbols(&self, source_manager: Arc<dyn SourceManager>) -> Self::SymbolIter

Get an iterator over the symbols in this symbol table, using the provided SourceManager to emit errors for symbols which are invalid/unresolvable.

Implementors§