Get rid of warnings

This commit is contained in:
greg 2018-11-17 19:17:19 -08:00
parent f79125e9df
commit 401d5aabd6

View File

@ -22,15 +22,11 @@ pub trait ASTVisitor<T> {
type EV : ExpressionVisitor<T>; type EV : ExpressionVisitor<T>;
type DV : DeclarationVisitor<T>; type DV : DeclarationVisitor<T>;
fn ast(&mut self, ast: &AST) { fn ast(&mut self, _ast: &AST) { }
} fn statement(&mut self, _statement: &Statement) { }
fn done(&mut self) -> T;
fn statement(&mut self, statement: &Statement) {
}
fn expression(&mut self) -> Self::EV; fn expression(&mut self) -> Self::EV;
fn declaration(&mut self) -> Self::DV; fn declaration(&mut self) -> Self::DV;
fn done(&mut self) -> T;
} }
pub trait ExpressionVisitor<T> { pub trait ExpressionVisitor<T> {
@ -38,8 +34,7 @@ pub trait ExpressionVisitor<T> {
visitor.expression(expr); visitor.expression(expr);
visitor.done() visitor.done()
} }
fn expression(&mut self, expression: &Expression) { fn expression(&mut self, _expression: &Expression) { }
}
fn done(&mut self) -> T; fn done(&mut self) -> T;
} }
@ -58,18 +53,10 @@ pub trait DeclarationVisitor<T> {
visitor.done() visitor.done()
} }
fn declaration(&mut self, decl: &Declaration) { fn declaration(&mut self, _decl: &Declaration) { }
} fn func_signature(&mut self, _sig: &Signature) { }
fn func_declaration(&mut self, _sig: &Signature, _block: &Vec<Statement>) { }
fn func_signature(&mut self, sig: &Signature) { fn type_declaration(&mut self, _name: &TypeSingletonName, _body: &TypeBody, _mutable: &bool) { }
}
fn func_declaration(&mut self, sig: &Signature, block: &Vec<Statement>) {
}
fn type_declaration(&mut self, name: &TypeSingletonName, body: &TypeBody, mutable: &bool) {
}
fn done(&mut self) -> T; fn done(&mut self) -> T;
} }