Struct acs::cal::symboltable::SymbolTable
source · [−]pub struct SymbolTable { /* private fields */ }
Expand description
Each scope has its own symbol table, with its own number of local variables
Implementations
sourceimpl SymbolTable
impl SymbolTable
sourcepub fn insert_local(&mut self, variable: &Variable) -> u16
pub fn insert_local(&mut self, variable: &Variable) -> u16
Inserts a new local variable in the symbol table and returns the index of the newly inserted variable
sourcepub fn insert_argument(&mut self, variable: &Variable)
pub fn insert_argument(&mut self, variable: &Variable)
Inserts a new argument variable in the symbol table and returns the index of the newly inserted variable
sourcepub fn get_segment_and_offset(&self, name: &str) -> Option<(Segment, u16)>
pub fn get_segment_and_offset(&self, name: &str) -> Option<(Segment, u16)>
Returns the segment and the offset of the variable with that name
pub fn get(&self, name: &str) -> Option<&SymbolEntry>
Trait Implementations
sourceimpl Default for SymbolTable
impl Default for SymbolTable
sourcefn default() -> SymbolTable
fn default() -> SymbolTable
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for SymbolTable
impl Send for SymbolTable
impl Sync for SymbolTable
impl Unpin for SymbolTable
impl UnwindSafe for SymbolTable
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more