diff --git a/schala-lang/language/src/ast/visitor.rs b/schala-lang/language/src/ast/visitor.rs index abd3ad7..2374cff 100644 --- a/schala-lang/language/src/ast/visitor.rs +++ b/schala-lang/language/src/ast/visitor.rs @@ -4,8 +4,8 @@ use crate::ast::*; //TODO maybe these functions should take closures that return a KeepRecursing | StopHere type, //or a tuple of (T, ) -pub trait ASTVisitor: Sized { - type BlockHandler: BlockVisitor = (); +pub trait ASTVisitor: Sized { + type BlockHandler: BlockVisitor; fn ast(&mut self, _ast: &AST) {} fn block(&mut self) -> Self::BlockHandler { Self::BlockHandler::new() } fn block_finished(&mut self, handler: Self::BlockHandler) {}