mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-11-26 20:14:46 +01:00
Update NodeVisitor doc comments
This commit is contained in:
parent
13304d5991
commit
70f86cb6cb
@ -21,12 +21,16 @@ interface NodeVisitor
|
||||
* Called when entering a node.
|
||||
*
|
||||
* Return value semantics:
|
||||
* * null: $node stays as-is
|
||||
* * otherwise: $node is set to the return value
|
||||
* * null
|
||||
* => $node stays as-is
|
||||
* * NodeTraverser::DONT_TRAVERSE_CHILDREN
|
||||
* => Children of $node are not traversed. $node stays as-is
|
||||
* * otherwise
|
||||
* => $node is set to the return value
|
||||
*
|
||||
* @param Node $node Node
|
||||
*
|
||||
* @return null|Node Node
|
||||
* @return null|Node|int Replacement node (or special return value)
|
||||
*/
|
||||
public function enterNode(Node $node);
|
||||
|
||||
@ -34,14 +38,18 @@ interface NodeVisitor
|
||||
* Called when leaving a node.
|
||||
*
|
||||
* Return value semantics:
|
||||
* * null: $node stays as-is
|
||||
* * false: $node is removed from the parent array
|
||||
* * array: The return value is merged into the parent array (at the position of the $node)
|
||||
* * otherwise: $node is set to the return value
|
||||
* * null
|
||||
* => $node stays as-is
|
||||
* * NodeTraverser::REMOVE_NODE
|
||||
* => $node is removed from the parent array
|
||||
* * array (of Nodes)
|
||||
* => The return value is merged into the parent array (at the position of the $node)
|
||||
* * otherwise
|
||||
* => $node is set to the return value
|
||||
*
|
||||
* @param Node $node Node
|
||||
*
|
||||
* @return null|Node|false|Node[] Node
|
||||
* @return null|Node|false|Node[] Replacement node (or special return value)
|
||||
*/
|
||||
public function leaveNode(Node $node);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user