From 226f7fb5f11b6eaf7a384f163f336c958eb129f9 Mon Sep 17 00:00:00 2001 From: Laytan Laats Date: Sat, 25 Mar 2023 15:12:21 +0100 Subject: [PATCH] refactor: remove unused function lastNode --- internal/php7/parser.go | 9 --------- internal/php8/parser.go | 9 --------- 2 files changed, 18 deletions(-) diff --git a/internal/php7/parser.go b/internal/php7/parser.go index bcb0a6d..4605d11 100644 --- a/internal/php7/parser.go +++ b/internal/php7/parser.go @@ -54,12 +54,3 @@ func (p *Parser) Parse() int { func (p *Parser) GetRootNode() ast.Vertex { return p.rootNode } - -// helpers - -func lastNode(nn []ast.Vertex) ast.Vertex { - if len(nn) == 0 { - return nil - } - return nn[len(nn)-1] -} diff --git a/internal/php8/parser.go b/internal/php8/parser.go index d7e445a..c903b40 100644 --- a/internal/php8/parser.go +++ b/internal/php8/parser.go @@ -55,12 +55,3 @@ func (p *Parser) Parse() int { func (p *Parser) GetRootNode() ast.Vertex { return p.rootNode } - -// helpers - -func lastNode(nn []ast.Vertex) ast.Vertex { - if len(nn) == 0 { - return nil - } - return nn[len(nn)-1] -}