Deleting old code

This commit is contained in:
greg 2017-08-31 00:02:17 -07:00
parent bb3f85dd16
commit 7a6dfbbd0e
2 changed files with 8 additions and 16 deletions

View File

@ -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 }
}
}

View File

@ -30,7 +30,7 @@ use virtual_machine::{run_vm, run_assembler};
fn main() {
let languages: Vec<Box<ProgrammingLanguageInterface>> =
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);
}
};