1
0
mirror of https://github.com/danog/PHP-Parser.git synced 2024-11-27 04:14:44 +01:00

Merge pull request #59 from Trismegiste/refactor-adding-an-interface-for-LSP

Adding an interface to the Node Traverser for LSP concern
This commit is contained in:
nikic 2013-05-22 14:45:21 -07:00
commit c0da1b88b2
2 changed files with 23 additions and 1 deletions

View File

@ -1,6 +1,6 @@
<?php
class PHPParser_NodeTraverser
class PHPParser_NodeTraverser implements PHPParser_NodeTraverserInterface
{
/**
* @var PHPParser_NodeVisitor[] Visitors

View File

@ -0,0 +1,22 @@
<?php
interface PHPParser_NodeTraverserInterface
{
/**
* Adds a visitor.
*
* @param PHPParser_NodeVisitor $visitor Visitor to add
*/
function addVisitor(PHPParser_NodeVisitor $visitor);
/**
* Traverses an array of nodes using the registered visitors.
*
* @param PHPParser_Node[] $nodes Array of nodes
*
* @return PHPParser_Node[] Traversed array of nodes
*/
function traverse(array $nodes);
}