start preparing to get rid of symbol_table.lookup_by_name

This commit is contained in:
greg 2019-03-10 17:32:47 -07:00
parent 24213070a3
commit d4ad97b39a
1 changed files with 1 additions and 5 deletions

View File

@ -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> {