Deleting old code
This commit is contained in:
parent
bb3f85dd16
commit
7a6dfbbd0e
@ -1,26 +1,25 @@
|
|||||||
use ::std::marker::PhantomData;
|
|
||||||
pub mod tokenizer;
|
pub mod tokenizer;
|
||||||
pub mod parser;
|
pub mod parser;
|
||||||
pub mod eval;
|
pub mod eval;
|
||||||
pub mod compilation;
|
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 use self::eval::Evaluator as MaaruEvaluator;
|
||||||
|
|
||||||
pub struct NewMaaru<'a> {
|
pub struct Maaru<'a> {
|
||||||
evaluator: MaaruEvaluator<'a>
|
evaluator: MaaruEvaluator<'a>
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> NewMaaru<'a> {
|
impl<'a> Maaru<'a> {
|
||||||
pub fn new() -> NewMaaru<'a> {
|
pub fn new() -> Maaru<'a> {
|
||||||
NewMaaru {
|
Maaru {
|
||||||
evaluator: MaaruEvaluator::new(None),
|
evaluator: MaaruEvaluator::new(None),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> ProgrammingLanguageInterface for NewMaaru<'a> {
|
impl<'a> ProgrammingLanguageInterface for Maaru<'a> {
|
||||||
fn get_language_name(&self) -> String {
|
fn get_language_name(&self) -> String {
|
||||||
"Maaru".to_string()
|
"Maaru".to_string()
|
||||||
}
|
}
|
||||||
@ -61,10 +60,3 @@ impl<'a> ProgrammingLanguageInterface for NewMaaru<'a> {
|
|||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Maaru<'a> { marker: PhantomData<&'a ()> }
|
|
||||||
impl<'a> Maaru<'a> {
|
|
||||||
pub fn new() -> Maaru <'a> {
|
|
||||||
Maaru { marker: PhantomData }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -30,7 +30,7 @@ use virtual_machine::{run_vm, run_assembler};
|
|||||||
fn main() {
|
fn main() {
|
||||||
let languages: Vec<Box<ProgrammingLanguageInterface>> =
|
let languages: Vec<Box<ProgrammingLanguageInterface>> =
|
||||||
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((schala_lang::Schala::new(), schala_lang::SchalaEvaluator::new())),
|
||||||
Box::new((maaru_lang::Maaru::new(), maaru_lang::MaaruEvaluator::new(None))),
|
Box::new((maaru_lang::Maaru::new(), maaru_lang::MaaruEvaluator::new(None))),
|
||||||
@ -87,7 +87,7 @@ fn main() {
|
|||||||
repl.run();
|
repl.run();
|
||||||
}
|
}
|
||||||
[_, ref filename, _..] => {
|
[_, ref filename, _..] => {
|
||||||
let mut language = maaru_lang::NewMaaru::new();
|
let mut language = maaru_lang::Maaru::new();
|
||||||
run_noninteractive(filename, &mut language, trace_evaluation, compile);
|
run_noninteractive(filename, &mut language, trace_evaluation, compile);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user