Trait cpclib_asm::preamble::SymbolsTableTrait
source · [−]pub trait SymbolsTableTrait {
Show 13 methods
fn expression_symbol(&self) -> Vec<(&Symbol, &Value), Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator, ;
fn is_used<S>(&self, symbol: S) -> bool
where
S: Into<Symbol>;
fn use_symbol<S>(&mut self, symbol: S)
where
S: Into<Symbol>;
fn int_value<S>(&self, symbol: S) -> Result<Option<i32>, SymbolError>
where
S: Into<Symbol>;
fn value<S>(&self, symbol: S) -> Result<Option<&Value>, SymbolError>
where
S: Into<Symbol>;
fn counter_value<S>(&self, symbol: S) -> Result<Option<i32>, SymbolError>
where
S: Into<Symbol>;
fn macro_value<S>(&self, symbol: S) -> Result<Option<&Macro>, SymbolError>
where
S: Into<Symbol>;
fn struct_value<S>(&self, symbol: S) -> Result<Option<&Struct>, SymbolError>
where
S: Into<Symbol>;
fn address_value<S>(
&self,
symbol: S
) -> Result<Option<&PhysicalAddress>, SymbolError>
where
S: Into<Symbol>;
fn remove_symbol<S>(
&mut self,
symbol: S
) -> Result<Option<Value>, SymbolError>
where
S: Into<Symbol>;
fn assign_symbol_to_value<S, V>(
&mut self,
symbol: S,
value: V
) -> Result<Option<Value>, SymbolError>
where
S: Into<Symbol>,
V: Into<Value>;
fn enter_namespace(&mut self, namespace: &str);
fn leave_namespace(&mut self) -> Result<Symbol, SymbolError>;
}Expand description
Public signature of symbols functions TODO add all the other methods
Required Methods
Return the symbols that correspond to integer values
Return true if the symbol has already been used in an expression
fn use_symbol<S>(&mut self, symbol: S) where
S: Into<Symbol>,
fn use_symbol<S>(&mut self, symbol: S) where
S: Into<Symbol>,
Add a symbol to the list of used symbols
Return the integer value corredponding to this symbol (if any)