pub struct SymbolTable(/* private fields */);Expand description
Symbol table holding global symbols.
Implementations§
Source§impl SymbolTable
impl SymbolTable
Sourcepub fn add_symbol(&mut self, symbol: Symbol) -> ResolveResult<()>
pub fn add_symbol(&mut self, symbol: Symbol) -> ResolveResult<()>
Add a new symbol to the table
Sourcepub fn insert_symbol(
&mut self,
id: Identifier,
symbol: Symbol,
) -> ResolveResult<()>
pub fn insert_symbol( &mut self, id: Identifier, symbol: Symbol, ) -> ResolveResult<()>
Add a new symbol to the table
Sourcepub fn unchecked(&self) -> Symbols
pub fn unchecked(&self) -> Symbols
Return a list of symbols which could not or have not been checked.
Sourcepub fn unused_private(&self) -> Symbols
pub fn unused_private(&self) -> Symbols
Return a list of unused private symbols
Use this after eval for any useful result.
Trait Implementations§
Source§impl Debug for SymbolTable
impl Debug for SymbolTable
Source§impl Default for SymbolTable
impl Default for SymbolTable
Source§fn default() -> SymbolTable
fn default() -> SymbolTable
Returns the “default value” for a type. Read more
Source§impl DerefMut for SymbolTable
impl DerefMut for SymbolTable
Source§impl Display for SymbolTable
impl Display for SymbolTable
Source§impl Lookup for SymbolTable
impl Lookup for SymbolTable
Source§fn lookup(
&self,
name: &QualifiedName,
target: LookupTarget,
) -> ResolveResult<Symbol>
fn lookup( &self, name: &QualifiedName, target: LookupTarget, ) -> ResolveResult<Symbol>
Lookup a symbol from global symbols.
Source§fn ambiguity_error(
ambiguous: QualifiedName,
others: QualifiedNames,
) -> ResolveError
fn ambiguity_error( ambiguous: QualifiedName, others: QualifiedNames, ) -> ResolveError
Return an ambiguity error.
Source§fn lookup_within(
&self,
name: &QualifiedName,
within: &Symbol,
target: LookupTarget,
) -> Result<Symbol, E>
fn lookup_within( &self, name: &QualifiedName, within: &Symbol, target: LookupTarget, ) -> Result<Symbol, E>
Search a symbol by it’s qualified name and within the given symbol. Read more
Source§fn lookup_within_opt(
&self,
name: &QualifiedName,
within: &Option<Symbol>,
target: LookupTarget,
) -> Result<Symbol, E>
fn lookup_within_opt( &self, name: &QualifiedName, within: &Option<Symbol>, target: LookupTarget, ) -> Result<Symbol, E>
Search a symbol by it’s qualified name and within a given symbol Read more
Source§fn deny_super(&self, name: &QualifiedName) -> ResolveResult<()>
fn deny_super(&self, name: &QualifiedName) -> ResolveResult<()>
Returns an error if name starts with
super::.Source§impl WriteToFile for SymbolTable
impl WriteToFile 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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more