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"