diff --git a/src/schala_lang/mod.rs b/src/schala_lang/mod.rs index 875088c..9dc0d11 100644 --- a/src/schala_lang/mod.rs +++ b/src/schala_lang/mod.rs @@ -62,8 +62,13 @@ impl ProgrammingLanguageInterface for Schala { } }; + if options.debug_symbol_table { + let text = self.type_context.debug_symbol_table(); + output.add_artifact(TraceArtifact::new("symbol_table", text)); + } + match self.type_context.type_check(&ast) { - Ok(t) => (), + Ok(_) => (), Err(msg) => { output.add_artifact(TraceArtifact::new("type_check", msg)); output.add_output(format!("Type error")); @@ -71,11 +76,6 @@ impl ProgrammingLanguageInterface for Schala { } } - if options.debug_symbol_table { - let text = self.type_context.debug_symbol_table(); - output.add_artifact(TraceArtifact::new("symbol_table", text)); - } - let evaluation_output = self.state.evaluate(ast); let mut acc = String::new(); let mut iter = evaluation_output.iter().peekable();