Get rid of warnings
This commit is contained in:
parent
f79125e9df
commit
401d5aabd6
@ -22,15 +22,11 @@ pub trait ASTVisitor<T> {
|
||||
type EV : ExpressionVisitor<T>;
|
||||
type DV : DeclarationVisitor<T>;
|
||||
|
||||
fn ast(&mut self, ast: &AST) {
|
||||
}
|
||||
fn done(&mut self) -> T;
|
||||
|
||||
fn statement(&mut self, statement: &Statement) {
|
||||
}
|
||||
|
||||
fn ast(&mut self, _ast: &AST) { }
|
||||
fn statement(&mut self, _statement: &Statement) { }
|
||||
fn expression(&mut self) -> Self::EV;
|
||||
fn declaration(&mut self) -> Self::DV;
|
||||
fn done(&mut self) -> T;
|
||||
}
|
||||
|
||||
pub trait ExpressionVisitor<T> {
|
||||
@ -38,8 +34,7 @@ pub trait ExpressionVisitor<T> {
|
||||
visitor.expression(expr);
|
||||
visitor.done()
|
||||
}
|
||||
fn expression(&mut self, expression: &Expression) {
|
||||
}
|
||||
fn expression(&mut self, _expression: &Expression) { }
|
||||
fn done(&mut self) -> T;
|
||||
}
|
||||
|
||||
@ -58,18 +53,10 @@ pub trait DeclarationVisitor<T> {
|
||||
visitor.done()
|
||||
}
|
||||
|
||||
fn declaration(&mut self, decl: &Declaration) {
|
||||
}
|
||||
|
||||
fn func_signature(&mut self, sig: &Signature) {
|
||||
}
|
||||
|
||||
fn func_declaration(&mut self, sig: &Signature, block: &Vec<Statement>) {
|
||||
}
|
||||
|
||||
fn type_declaration(&mut self, name: &TypeSingletonName, body: &TypeBody, mutable: &bool) {
|
||||
}
|
||||
|
||||
fn declaration(&mut self, _decl: &Declaration) { }
|
||||
fn func_signature(&mut self, _sig: &Signature) { }
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user