Compiler bug!??!

This commit is contained in:
greg 2019-12-15 11:58:45 -08:00
parent b23b8ebdc7
commit a236817956

View File

@ -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, <that type>)
pub trait ASTVisitor: Sized {
type BlockHandler: BlockVisitor = ();
pub trait ASTVisitor<BlockHandler=()>: 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) {}