From 56f0550829674197dee682d2037d92c9f4e50de2 Mon Sep 17 00:00:00 2001 From: John Date: Tue, 9 Jan 2024 21:04:28 -0600 Subject: [PATCH] resolver: remove unused, deprecated stack functions --- libconlang/src/resolver.rs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/libconlang/src/resolver.rs b/libconlang/src/resolver.rs index dd81992..a179360 100644 --- a/libconlang/src/resolver.rs +++ b/libconlang/src/resolver.rs @@ -417,17 +417,6 @@ impl Resolver { pub fn exit_scope(&mut self) -> Option { self.scopes.pop().map(|scope| scope.count) } - //#[deprecated] - pub fn push_ty(&mut self, ty: Type) { - debugln!("Pushed {ty}"); - self.types.push(ty) - } - //#[deprecated] - pub fn pop_ty(&mut self) -> TyResult { - self.types - .pop() - .ok_or_else(|| panic!("Underflow in resolver type stack")) - } /// Resolves a name to a [Variable] pub fn get(&self, name: &str) -> TyResult<&Variable> { if let Some(var) = self.scopes.iter().rev().find_map(|s| s.get(name)) { @@ -542,7 +531,7 @@ impl Resolve for Let { impl Resolve for FnDecl { fn resolve(&mut self, resolver: &mut Resolver) -> TyResult { let FnDecl { name: Name { symbol: Identifier { name, index }, .. }, args, body } = self; - debugln!("> fn {name} ..."); + debugln!("ty> fn {name} ..."); // register the name at module scope *index = Some(resolver.insert_module(name, false)?); // create a new lexical scope