pub struct SymbolTable { /* private fields */ }Expand description
A hierarchical symbol table for name resolution.
Implementations§
Source§impl SymbolTable
impl SymbolTable
Sourcepub fn build(units: &[RawCodeUnit]) -> AcbResult<Self>
pub fn build(units: &[RawCodeUnit]) -> AcbResult<Self>
Build symbol table from raw units.
Sourcepub fn lookup_qualified(&self, qname: &str) -> Option<u64>
pub fn lookup_qualified(&self, qname: &str) -> Option<u64>
Look up a unit by qualified name.
Sourcepub fn lookup_name(&self, name: &str) -> &[u64]
pub fn lookup_name(&self, name: &str) -> &[u64]
Look up units by simple name.
Sourcepub fn units_in_file(&self, file_path: &str) -> &[u64]
pub fn units_in_file(&self, file_path: &str) -> &[u64]
Look up units in the same file.
Sourcepub fn qname_for_id(&self, id: u64) -> Option<&str>
pub fn qname_for_id(&self, id: u64) -> Option<&str>
Get the qualified name for a temp_id.
Sourcepub fn all_symbols(&self) -> &HashMap<String, u64>
pub fn all_symbols(&self) -> &HashMap<String, u64>
Get all symbol entries.
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 UnsafeUnpin 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