diff --git a/src/main.rs b/src/main.rs index 2b96925..7bda796 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,6 +15,7 @@ use schala_lang::SchalaEvaluator; use schala_lang::Schala; */ +mod schala_lang; mod maaru_lang; mod robo_lang; @@ -29,6 +30,7 @@ use virtual_machine::{run_vm, run_assembler}; fn main() { let languages: Vec> = vec![ + Box::new((schala_lang::Schala::new(), schala_lang::SchalaEvaluator::new())), Box::new((maaru_lang::Maaru::new(), maaru_lang::MaaruEvaluator::new(None))), Box::new((robo_lang::Robo::new(), robo_lang::RoboEvaluator::new())), ]; diff --git a/src/schala_lang/mod.rs b/src/schala_lang/mod.rs new file mode 100644 index 0000000..24929bd --- /dev/null +++ b/src/schala_lang/mod.rs @@ -0,0 +1,51 @@ +use language::{ProgrammingLanguage, EvaluationMachine, ParseError, TokenError, LLVMCodeString}; + +pub struct Schala { +} + +#[derive(Debug)] +enum Token { } +#[derive(Debug)] +enum AST { } + +impl Schala { + pub fn new() -> Schala { + Schala { } + } +} + +impl ProgrammingLanguage for Schala { + type Token = Token; + type AST = AST; + type Evaluator = SchalaEvaluator; + + fn name() -> String { + "Schala".to_string() + } + + fn tokenize(input: &str) -> Result, TokenError> { + unimplemented!() + } + fn parse(input: Vec) -> Result { + unimplemented!() + } + fn evaluate(ast: Self::AST, evaluator: &mut Self::Evaluator) -> Vec { + unimplemented!() + } + fn compile(ast: Self::AST) -> LLVMCodeString { + unimplemented!() + } +} + +pub struct SchalaEvaluator { } + +impl EvaluationMachine for SchalaEvaluator { + fn new() -> SchalaEvaluator { + SchalaEvaluator { } + } + fn set_option(&mut self, option: &str, value: bool) -> bool { + false + } +} + +