Remove lookup_by_name

This commit is contained in:
greg 2019-09-10 03:35:11 -07:00
parent 1ecf1e506c
commit 22887678bd

View File

@ -99,17 +99,6 @@ impl SymbolTable {
self.symbol_path_to_symbol.insert(fully_qualified_name, symbol);
}
pub fn lookup_by_name(&self, name: &Rc<String>) -> Option<&Symbol> {
let vec = vec![
ScopeSegment {
name: name.clone(),
kind: ScopeSegmentKind::Terminal,
}
];
let symbol_path = FullyQualifiedSymbolName(vec);
self.lookup_by_fqsn(&symbol_path)
}
pub fn lookup_by_fqsn(&self, fully_qualified_path: &FullyQualifiedSymbolName) -> Option<&Symbol> {
self.symbol_path_to_symbol.get(fully_qualified_path)
}