From 401d5aabd61aaeec215d2db7f38857ec31536294 Mon Sep 17 00:00:00 2001 From: greg Date: Sat, 17 Nov 2018 19:17:19 -0800 Subject: [PATCH] Get rid of warnings --- schala-lang/language/src/ast_visitor.rs | 29 +++++++------------------ 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/schala-lang/language/src/ast_visitor.rs b/schala-lang/language/src/ast_visitor.rs index d3c09f8..f346785 100644 --- a/schala-lang/language/src/ast_visitor.rs +++ b/schala-lang/language/src/ast_visitor.rs @@ -22,15 +22,11 @@ pub trait ASTVisitor { type EV : ExpressionVisitor; type DV : DeclarationVisitor; - 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 { @@ -38,8 +34,7 @@ pub trait ExpressionVisitor { 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 { visitor.done() } - fn declaration(&mut self, decl: &Declaration) { - } - - fn func_signature(&mut self, sig: &Signature) { - } - - fn func_declaration(&mut self, sig: &Signature, block: &Vec) { - } - - 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) { } + fn type_declaration(&mut self, _name: &TypeSingletonName, _body: &TypeBody, _mutable: &bool) { } fn done(&mut self) -> T; }