schala/src/schala_lang/eval.rs

25 lines
379 B
Rust
Raw Normal View History

2017-09-30 23:30:02 -07:00
use schala_lang::parsing::AST;
pub struct ReplState {
}
2017-10-01 00:48:08 -07:00
pub enum TypeCheck {
OK,
Error(String)
}
2017-09-30 23:30:02 -07:00
impl ReplState {
pub fn new() -> ReplState {
ReplState { }
}
pub fn evaluate(&mut self, ast: AST) -> String {
format!("Evaluated AST: {:?}", ast)
}
2017-10-01 00:48:08 -07:00
pub fn type_check(&mut self, ast: &AST) -> TypeCheck {
TypeCheck::Error("type lol".to_string())
}
2017-09-30 23:30:02 -07:00
}