From 92ad4767c8d515bc9ba92c52c034ef7fcffc5308 Mon Sep 17 00:00:00 2001 From: greg Date: Wed, 16 Oct 2019 10:39:48 -0700 Subject: [PATCH] Remove some extraneous code --- schala-lang/language/src/scope_resolution.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/schala-lang/language/src/scope_resolution.rs b/schala-lang/language/src/scope_resolution.rs index d3d7f64..11c6ebb 100644 --- a/schala-lang/language/src/scope_resolution.rs +++ b/schala-lang/language/src/scope_resolution.rs @@ -10,14 +10,9 @@ type NameScopeStack<'t> = ScopeStack<'t, Rc, FQSNPrefix>; pub struct ScopeResolver<'a> { symbol_table: &'a mut SymbolTable, name_scope_stack: ScopeStack<'a, Rc, FQSNPrefix>, - errors: Vec<()>, } impl<'a> ASTVisitor for ScopeResolver<'a> { - fn ast(&mut self, _ast: &AST) { - println!("VISITING AST!!!"); - } - fn import(&mut self, import_spec: &ImportSpecifier) { let ImportSpecifier { ref path_components, ref imported_names, .. } = &import_spec; match imported_names { @@ -56,7 +51,7 @@ impl<'a> ASTVisitor for ScopeResolver<'a> { use Pattern::*; match pat { Ignored => (), - TuplePattern(patterns) => (), + TuplePattern(_) => (), Literal(_) => (), TupleStruct(name, _) => self.qualified_name_in_pattern(name), Record(name, _) => self.qualified_name_in_pattern(name), @@ -68,11 +63,11 @@ impl<'a> ASTVisitor for ScopeResolver<'a> { impl<'a> ScopeResolver<'a> { pub fn new(symbol_table: &'a mut SymbolTable) -> ScopeResolver { let name_scope_stack = ScopeStack::new(None); - ScopeResolver { symbol_table, name_scope_stack, errors: vec![] } + ScopeResolver { symbol_table, name_scope_stack } } pub fn resolve(&mut self, ast: &mut AST) -> Result<(), String> { walk_ast(self, ast); - Ok(()) //TODO make this error meaningful + Ok(()) } //TODO this is incomplete