From d4ad97b39a9ee5ec1997b8f5efc823c216797af4 Mon Sep 17 00:00:00 2001 From: greg Date: Sun, 10 Mar 2019 17:32:47 -0700 Subject: [PATCH] start preparing to get rid of symbol_table.lookup_by_name --- schala-lang/language/src/symbol_table.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/schala-lang/language/src/symbol_table.rs b/schala-lang/language/src/symbol_table.rs index 91ebe16..160a392 100644 --- a/schala-lang/language/src/symbol_table.rs +++ b/schala-lang/language/src/symbol_table.rs @@ -40,11 +40,7 @@ impl SymbolTable { } pub fn lookup_by_name(&self, name: &Rc) -> 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, path: &Vec>) -> Option<&Symbol> {