From 626b17cbd226296c79a12b9e0179f4017e53e8b2 Mon Sep 17 00:00:00 2001 From: greg Date: Wed, 30 Aug 2017 19:09:22 -0700 Subject: [PATCH] Idea for trait redesign --- src/language.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/language.rs b/src/language.rs index d876d86..c277a84 100644 --- a/src/language.rs +++ b/src/language.rs @@ -94,3 +94,25 @@ impl LanguageInterface for (PL, PL::Evaluator) where PL: Programmin output } } + +/* below here is new versions of everything */ + +#[derive(Debug, PartialEq)] +pub struct EvalStage { + index: u8, + name: String, +} + +pub struct EvalOptions { + debug_stages: Vec, +} + +pub trait ProgrammingLanguageInterface { + fn evaluate_in_repl(&mut self, input: &str, eval_options: EvalOptions); + fn get_language_name(&self) -> String; + fn get_stages(&self) -> Vec; +} + +pub trait CompileableLanguage : ProgrammingLanguageInterface { + fn compile(&mut self); +}