Struct cton_reader::SourceMap
[−]
[src]
pub struct SourceMap { /* fields omitted */ }
Mapping from entity names to source locations.
Methods
impl SourceMap
[src]
Read-only interface which is exposed outside the parser crate.
pub fn contains_value(&self, v: Value) -> bool
[src]
Look up a value entity.
pub fn contains_ebb(&self, ebb: Ebb) -> bool
[src]
Look up a EBB entity.
pub fn contains_ss(&self, ss: StackSlot) -> bool
[src]
Look up a stack slot entity.
pub fn contains_gv(&self, gv: GlobalVar) -> bool
[src]
Look up a global variable entity.
pub fn contains_heap(&self, heap: Heap) -> bool
[src]
Look up a heap entity.
pub fn contains_sig(&self, sig: SigRef) -> bool
[src]
Look up a signature entity.
pub fn contains_fn(&self, fn_: FuncRef) -> bool
[src]
Look up a function entity.
pub fn contains_jt(&self, jt: JumpTable) -> bool
[src]
Look up a jump table entity.
pub fn lookup_str(&self, name: &str) -> Option<AnyEntity>
[src]
Look up an entity by source name.
Returns the entity reference corresponding to name
, if it exists.
pub fn location(&self, entity: AnyEntity) -> Option<Location>
[src]
Get the source location where an entity was defined.
impl SourceMap
[src]
pub fn new() -> Self
[src]
Create a new empty SourceMap
.
pub fn def_value(&mut self, entity: Value, loc: &Location) -> Result<()>
[src]
Define the value entity
.
pub fn def_ebb(&mut self, entity: Ebb, loc: &Location) -> Result<()>
[src]
Define the ebb entity
.
pub fn def_ss(&mut self, entity: StackSlot, loc: &Location) -> Result<()>
[src]
Define the stack slot entity
.
pub fn def_gv(&mut self, entity: GlobalVar, loc: &Location) -> Result<()>
[src]
Define the global variable entity
.
pub fn def_heap(&mut self, entity: Heap, loc: &Location) -> Result<()>
[src]
Define the heap entity
.
pub fn def_sig(&mut self, entity: SigRef, loc: &Location) -> Result<()>
[src]
Define the signature entity
.
pub fn def_fn(&mut self, entity: FuncRef, loc: &Location) -> Result<()>
[src]
Define the external function entity
.
pub fn def_jt(&mut self, entity: JumpTable, loc: &Location) -> Result<()>
[src]
Define the jump table entity
.
pub fn def_entity(&mut self, entity: AnyEntity, loc: &Location) -> Result<()>
[src]
Define an entity. This can be used for instructions whose numbers never appear in source, or implicitly defined signatures.