diff --git a/schala-lang/language/src/lib.rs b/schala-lang/language/src/lib.rs index 8b82cb8..94da9a6 100644 --- a/schala-lang/language/src/lib.rs +++ b/schala-lang/language/src/lib.rs @@ -21,7 +21,7 @@ use std::cell::RefCell; use std::rc::Rc; use itertools::Itertools; -use schala_repl::{ProgrammingLanguageInterface, ComputationRequest, ComputationResponse, GlobalOutputStats}; +use schala_repl::{ProgrammingLanguageInterface, ComputationRequest, ComputationResponse, LangMetaRequest, LangMetaResponse, GlobalOutputStats}; macro_rules! bx { ($e:expr) => { Box::new($e) } diff --git a/schala-repl/src/language.rs b/schala-repl/src/language.rs index 989c3e5..fd7bcf5 100644 --- a/schala-repl/src/language.rs +++ b/schala-repl/src/language.rs @@ -15,6 +15,10 @@ pub trait ProgrammingLanguageInterface { fn repl_request(&self, repl_request: String) -> String { format!("<>") } + + fn request_meta(&mut self, _request: LangMetaRequest) -> LangMetaResponse { + LangMetaResponse::Custom { kind: format!("not-implemented"), value: format!("") } + } } pub struct ComputationRequest<'a> { @@ -38,6 +42,22 @@ pub struct DebugResponse { value: String } +pub enum LangMetaRequest { + StageNames, + Custom { + kind: String, + value: String + } +} + +pub enum LangMetaResponse { + StageNames(Vec), + Custom { + kind: String, + value: String + } +} + #[derive(Default, Debug)] pub struct GlobalOutputStats { total_duration: Option, diff --git a/schala-repl/src/lib.rs b/schala-repl/src/lib.rs index 5f65185..029a807 100644 --- a/schala-repl/src/lib.rs +++ b/schala-repl/src/lib.rs @@ -24,7 +24,7 @@ mod repl; mod language; mod webapp; -pub use language::{ProgrammingLanguageInterface, ComputationRequest, ComputationResponse, GlobalOutputStats}; +pub use language::{ProgrammingLanguageInterface, ComputationRequest, ComputationResponse, LangMetaRequest, LangMetaResponse, GlobalOutputStats}; include!(concat!(env!("OUT_DIR"), "/static.rs")); const VERSION_STRING: &'static str = "0.1.0";