From 7a6dfbbd0e25db287bfacded20536d317cb56320 Mon Sep 17 00:00:00 2001 From: greg Date: Thu, 31 Aug 2017 00:02:17 -0700 Subject: [PATCH] Deleting old code --- src/maaru_lang/mod.rs | 20 ++++++-------------- src/main.rs | 4 ++-- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/src/maaru_lang/mod.rs b/src/maaru_lang/mod.rs index 1d2286a..407745c 100644 --- a/src/maaru_lang/mod.rs +++ b/src/maaru_lang/mod.rs @@ -1,26 +1,25 @@ -use ::std::marker::PhantomData; pub mod tokenizer; pub mod parser; pub mod eval; pub mod compilation; -use language::{ProgrammingLanguageInterface, EvalOptions, ProgrammingLanguage, EvaluationMachine, ParseError, TokenError, LLVMCodeString}; +use language::{ProgrammingLanguageInterface, EvalOptions, LLVMCodeString}; pub use self::eval::Evaluator as MaaruEvaluator; -pub struct NewMaaru<'a> { +pub struct Maaru<'a> { evaluator: MaaruEvaluator<'a> } -impl<'a> NewMaaru<'a> { - pub fn new() -> NewMaaru<'a> { - NewMaaru { +impl<'a> Maaru<'a> { + pub fn new() -> Maaru<'a> { + Maaru { evaluator: MaaruEvaluator::new(None), } } } -impl<'a> ProgrammingLanguageInterface for NewMaaru<'a> { +impl<'a> ProgrammingLanguageInterface for Maaru<'a> { fn get_language_name(&self) -> String { "Maaru".to_string() } @@ -61,10 +60,3 @@ impl<'a> ProgrammingLanguageInterface for NewMaaru<'a> { return output; } } - -pub struct Maaru<'a> { marker: PhantomData<&'a ()> } -impl<'a> Maaru<'a> { - pub fn new() -> Maaru <'a> { - Maaru { marker: PhantomData } - } -} diff --git a/src/main.rs b/src/main.rs index f47899a..3b0badf 100644 --- a/src/main.rs +++ b/src/main.rs @@ -30,7 +30,7 @@ use virtual_machine::{run_vm, run_assembler}; fn main() { let languages: Vec> = vec![ - Box::new(maaru_lang::NewMaaru::new()), + Box::new(maaru_lang::Maaru::new()), /* Box::new((schala_lang::Schala::new(), schala_lang::SchalaEvaluator::new())), Box::new((maaru_lang::Maaru::new(), maaru_lang::MaaruEvaluator::new(None))), @@ -87,7 +87,7 @@ fn main() { repl.run(); } [_, ref filename, _..] => { - let mut language = maaru_lang::NewMaaru::new(); + let mut language = maaru_lang::Maaru::new(); run_noninteractive(filename, &mut language, trace_evaluation, compile); } };