Back to including typechecking code in pipeline
This commit is contained in:
parent
7a2a4df297
commit
ba4185b0fb
@ -89,8 +89,7 @@ fn symbol_table(handle: &mut Schala, input: parsing::AST, comp: Option<&mut Unfi
|
||||
}
|
||||
|
||||
fn typechecking(handle: &mut Schala, input: parsing::AST, comp: Option<&mut UnfinishedComputation>) -> Result<parsing::AST, String> {
|
||||
/*
|
||||
match handle.type_context.borrow_mut().type_check_ast(&input) {
|
||||
match handle.type_context.type_check_ast(&input) {
|
||||
Ok(ty) => {
|
||||
comp.map(|comp| comp.add_artifact(TraceArtifact::new("type_check", format!("{:?}", ty))));
|
||||
Ok(input)
|
||||
@ -100,8 +99,6 @@ fn typechecking(handle: &mut Schala, input: parsing::AST, comp: Option<&mut Unfi
|
||||
Ok(input)
|
||||
}
|
||||
}
|
||||
*/
|
||||
Ok(input)
|
||||
}
|
||||
|
||||
fn ast_reducing(_handle: &mut Schala, input: parsing::AST, comp: Option<&mut UnfinishedComputation>) -> Result<ast_reducing::ReducedAST, String> {
|
||||
|
@ -139,6 +139,15 @@ impl TypeEnvironment {
|
||||
}
|
||||
}
|
||||
|
||||
impl TypeContext {
|
||||
pub fn type_check_ast(&mut self, ast: &parsing::AST) -> TypeResult<String> {
|
||||
Ok(format!("SUCKA"))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* TODO this should just check the name against a map, and that map should be pre-populated with
|
||||
* types */
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user