start preparing to get rid of symbol_table.lookup_by_name
This commit is contained in:
parent
24213070a3
commit
d4ad97b39a
@ -40,11 +40,7 @@ impl SymbolTable {
|
||||
}
|
||||
|
||||
pub fn lookup_by_name(&self, name: &Rc<String>) -> Option<&Symbol> {
|
||||
let symbol_path = SymbolPath {
|
||||
name: name.clone(),
|
||||
enclosing_scopes: vec![]
|
||||
};
|
||||
self.values.get(&symbol_path)
|
||||
self.lookup_by_path(name, &vec![])
|
||||
}
|
||||
|
||||
pub fn lookup_by_path(&self, name: &Rc<String>, path: &Vec<Rc<String>>) -> Option<&Symbol> {
|
||||
|
Loading…
Reference in New Issue
Block a user