Trait cpclib_asm::preamble::SymbolsTableTrait
source · pub trait SymbolsTableTrait {
Show 13 methods
// Required methods
fn expression_symbol(&self) -> Vec<(&Symbol, &Value), Global>;
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§
sourcefn expression_symbol(&self) -> Vec<(&Symbol, &Value), Global>
fn expression_symbol(&self) -> Vec<(&Symbol, &Value), Global>
Return the symbols that correspond to integer values
sourcefn is_used<S>(&self, symbol: S) -> boolwhere
S: Into<Symbol>,
fn is_used<S>(&self, symbol: S) -> boolwhere S: Into<Symbol>,
Return true if the symbol has already been used in an expression
sourcefn 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
sourcefn int_value<S>(&self, symbol: S) -> Result<Option<i32>, SymbolError>where
S: Into<Symbol>,
fn int_value<S>(&self, symbol: S) -> Result<Option<i32>, SymbolError>where S: Into<Symbol>,
Return the integer value corredponding to this symbol (if any)