From b934f01c677ba3b5cd7ac423807df5c7c51ee95b Mon Sep 17 00:00:00 2001 From: Laytan Laats Date: Sat, 25 Mar 2023 21:54:47 +0100 Subject: [PATCH] refactor: remove unused and confusing function implementations --- pkg/visitor/null.go | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/pkg/visitor/null.go b/pkg/visitor/null.go index 02093f8..38c256a 100644 --- a/pkg/visitor/null.go +++ b/pkg/visitor/null.go @@ -4,23 +4,9 @@ import ( "github.com/VKCOM/php-parser/pkg/ast" ) -type Null struct { -} +type Null struct{} -func (v *Null) Enter(_ string, _ bool) { - // do nothing -} -func (v *Null) Leave(_ string, _ bool) { - // do nothing -} - -func (v *Null) EnterNode(_ ast.Vertex) bool { - return true -} - -func (v *Null) LeaveNode(_ ast.Vertex) { - // do nothing -} +var _ ast.Visitor = &Null{} func (v *Null) Root(_ *ast.Root) { // do nothing