From 769ef448e8c84462a58ecbfecc711a92172e9977 Mon Sep 17 00:00:00 2001 From: Greg Shuflin Date: Tue, 19 Oct 2021 00:37:44 -0700 Subject: [PATCH] Mark out weird oddity with value() in reduced_ast --- schala-lang/language/src/reduced_ast.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/schala-lang/language/src/reduced_ast.rs b/schala-lang/language/src/reduced_ast.rs index 2192d94..b838f10 100644 --- a/schala-lang/language/src/reduced_ast.rs +++ b/schala-lang/language/src/reduced_ast.rs @@ -185,13 +185,16 @@ impl<'a> Reducer<'a> { //TODO this probably needs to change let FullyQualifiedSymbolName(ref v) = sym_name; - let name = v.last().unwrap().name.clone(); + //let name = v.last().unwrap().name.clone(); let Symbol { local_name, spec, .. } = match self.symbol_table.lookup_by_fqsn(&sym_name) { Some(s) => s, - //TODO investigate why this fails + //TODO this causes several evaluation tests to fail, figure out what's going on here //None => return Expr::ReductionError(format!("Symbol {:?} not found", sym_name)), - None => return Expr::Sym(name) + None => { + let name = qualified_name.components.last().unwrap().clone(); + return Expr::Sym(name) + } }; match spec {