Add get_fqsn_from_id opposite lookup method
This commit is contained in:
parent
6ebe893acb
commit
8b1dd561f2
@ -97,6 +97,10 @@ impl SymbolTable {
|
||||
self.id_to_fqsn.insert(id.clone(), fqsn);
|
||||
}
|
||||
|
||||
pub fn get_fqsn_from_id(&mut self, id: &ItemId) -> Option<FullyQualifiedSymbolName> {
|
||||
self.id_to_fqsn.get(&id).cloned()
|
||||
}
|
||||
|
||||
fn add_new_symbol(&mut self, name: &Rc<String>, scope_path: &Vec<ScopeSegment>, spec: SymbolSpec) {
|
||||
let mut vec: Vec<ScopeSegment> = scope_path.clone();
|
||||
vec.push(ScopeSegment { name: name.clone(), kind: ScopeSegmentKind::Terminal });
|
||||
|
Loading…
Reference in New Issue
Block a user