From 3d3acc027a0055177c56d10341bd9d6e99f1818f Mon Sep 17 00:00:00 2001 From: No-OBu Date: Wed, 15 Aug 2018 21:44:14 +0200 Subject: [PATCH] Update to the last version of PHP-Parser (4.0) --- PHPCtags.class.php | 4 ++++ composer.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/PHPCtags.class.php b/PHPCtags.class.php index fcffb55..fb59f73 100644 --- a/PHPCtags.class.php +++ b/PHPCtags.class.php @@ -132,6 +132,10 @@ private function struct($node, $reset=FALSE, $parent=array()) foreach ($node as $subNode) { $this->struct($subNode); } + } elseif ($node instanceof Stmt\Expression) { + foreach ($node as $subNode) { + $this->struct($subNode); + } } elseif ($node instanceof Stmt\Class_) { $kind = 'c'; $name = $node->name; diff --git a/composer.json b/composer.json index 1df040c..80dcfbd 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "type": "library", "require": { "php": ">=5.3", - "nikic/php-parser": "^3.1" + "nikic/php-parser": "^4.0" }, "require-dev": { "phpunit/phpunit": "~4"