From e99479ffcc85baf13f9b8e8405157c191f9d2213 Mon Sep 17 00:00:00 2001 From: greg Date: Tue, 20 Mar 2018 21:13:34 -0700 Subject: [PATCH] Removed (for now) LLVMCodeString --- schala-lib/src/language.rs | 15 --------------- schala-lib/src/lib.rs | 4 +++- src/maaru_lang/mod.rs | 5 ++++- 3 files changed, 7 insertions(+), 17 deletions(-) diff --git a/schala-lib/src/language.rs b/schala-lib/src/language.rs index 8a90059..e75e243 100644 --- a/schala-lib/src/language.rs +++ b/schala-lib/src/language.rs @@ -9,15 +9,6 @@ pub struct LLVMCodeString(pub String); pub struct EvalOptions { pub debug: DebugOptions, pub execution_method: ExecutionMethod - /* - pub debug_tokens: bool, - pub debug_parse: bool, - pub debug_type: bool, - pub debug_symbol_table: bool, - pub show_llvm_ir: bool, - pub trace_evaluation: bool, - pub compile: bool, - */ } #[derive(Debug, Serialize, Deserialize)] pub enum ExecutionMethod { @@ -161,10 +152,4 @@ pub trait ProgrammingLanguageInterface { } fn get_language_name(&self) -> String; fn get_source_file_suffix(&self) -> String; - fn compile(&mut self, _input: &str) -> LLVMCodeString { - LLVMCodeString("".to_string()) - } - fn can_compile(&self) -> bool { - false - } } diff --git a/schala-lib/src/lib.rs b/schala-lib/src/lib.rs index cbe1c10..3b4e646 100644 --- a/schala-lib/src/lib.rs +++ b/schala-lib/src/lib.rs @@ -33,7 +33,7 @@ pub mod llvm_wrap; include!(concat!(env!("OUT_DIR"), "/static.rs")); -pub use language::{ProgrammingLanguageInterface, EvalOptions, ExecutionMethod, TraceArtifact, LanguageOutput, LLVMCodeString, FinishedComputation, UnfinishedComputation}; +pub use language::{LLVMCodeString, ProgrammingLanguageInterface, EvalOptions, ExecutionMethod, TraceArtifact, LanguageOutput, FinishedComputation, UnfinishedComputation}; pub type PLIGenerator = Box Box + Send + Sync>; pub fn schala_main(generators: Vec) { @@ -306,6 +306,7 @@ impl Repl { } } +/* pub fn compilation_sequence(llvm_code: LLVMCodeString, sourcefile: &str) { use std::process::Command; @@ -351,6 +352,7 @@ pub fn compilation_sequence(llvm_code: LLVMCodeString, sourcefile: &str) { .expect(&format!("failed to run rm {}", filename)); } } +*/ fn program_options() -> getopts::Options { let mut options = getopts::Options::new(); diff --git a/src/maaru_lang/mod.rs b/src/maaru_lang/mod.rs index c1b784e..1e32768 100644 --- a/src/maaru_lang/mod.rs +++ b/src/maaru_lang/mod.rs @@ -3,7 +3,7 @@ pub mod parser; pub mod eval; pub mod compilation; -use schala_lib::{ProgrammingLanguageInterface, EvalOptions, LanguageOutput, TraceArtifact, LLVMCodeString}; +use schala_lib::{ProgrammingLanguageInterface, EvalOptions, LanguageOutput, TraceArtifact}; #[derive(Debug)] pub struct TokenError { @@ -74,6 +74,8 @@ impl<'a> ProgrammingLanguageInterface for Maaru<'a> { return output; } + /* TODO make this work with new framework */ + /* fn can_compile(&self) -> bool { true } @@ -96,4 +98,5 @@ impl<'a> ProgrammingLanguageInterface for Maaru<'a> { }; compilation::compile_ast(ast) } + */ }