From 1e4554258f9e0ad0e78de208176ac054c9bd97f2 Mon Sep 17 00:00:00 2001 From: greg Date: Wed, 2 May 2018 01:59:09 -0700 Subject: [PATCH] KIll old code --- schala-repl/src/language.rs | 36 ------------------------------------ schala-repl/src/lib.rs | 2 +- 2 files changed, 1 insertion(+), 37 deletions(-) diff --git a/schala-repl/src/language.rs b/schala-repl/src/language.rs index 2975be8..28fb33c 100644 --- a/schala-repl/src/language.rs +++ b/schala-repl/src/language.rs @@ -32,42 +32,6 @@ pub struct DebugOptions { pub llvm_ir: bool, } -#[derive(Debug, Default)] -pub struct LanguageOutput { - output: String, - artifacts: Vec, - pub failed: bool, -} - -impl LanguageOutput { - pub fn add_artifact(&mut self, artifact: TraceArtifact) { - self.artifacts.push(artifact); - } - pub fn add_output(&mut self, output: String) { - self.output = output; - } - - pub fn to_string(&self) -> String { - let mut acc = String::new(); - for line in self.artifacts.iter() { - acc.push_str(&line.debug_output.color(line.text_color).to_string()); - acc.push_str(&"\n"); - } - acc.push_str(&self.output); - acc - } - - pub fn print_to_screen(&self) { - for line in self.artifacts.iter() { - let color = line.text_color; - let stage = line.stage_name.color(color).to_string(); - let output = line.debug_output.color(color).to_string(); - println!("{}: {}", stage, output); - } - println!("{}", self.output); - } -} - #[derive(Debug, Default)] pub struct UnfinishedComputation { artifacts: HashMap, diff --git a/schala-repl/src/lib.rs b/schala-repl/src/lib.rs index b850e3a..128a1d9 100644 --- a/schala-repl/src/lib.rs +++ b/schala-repl/src/lib.rs @@ -34,7 +34,7 @@ const VERSION_STRING: &'static str = "0.1.0"; include!(concat!(env!("OUT_DIR"), "/static.rs")); -pub use language::{LLVMCodeString, ProgrammingLanguageInterface, EvalOptions, ExecutionMethod, TraceArtifact, LanguageOutput, FinishedComputation, UnfinishedComputation}; +pub use language::{LLVMCodeString, ProgrammingLanguageInterface, EvalOptions, ExecutionMethod, TraceArtifact, FinishedComputation, UnfinishedComputation}; pub type PLIGenerator = Box Box + Send + Sync>; pub fn repl_main(generators: Vec) {