Mercurial > hg > isophonics-drupal-site
comparison vendor/nikic/php-parser/doc/2_Usage_of_basic_components.markdown @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | c2387f117808 |
children |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
337 | 337 |
338 All four methods can either return the changed node or not return at all (i.e. `null`) in which | 338 All four methods can either return the changed node or not return at all (i.e. `null`) in which |
339 case the current node is not changed. | 339 case the current node is not changed. |
340 | 340 |
341 The `enterNode()` method can additionally return the value `NodeTraverser::DONT_TRAVERSE_CHILDREN`, | 341 The `enterNode()` method can additionally return the value `NodeTraverser::DONT_TRAVERSE_CHILDREN`, |
342 which instructs the traverser to skip all children of the current node. | 342 which instructs the traverser to skip all children of the current node. To furthermore prevent subsequent |
343 visitors from visiting the current node, `NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN` can be used instead. | |
343 | 344 |
344 The `leaveNode()` method can additionally return the value `NodeTraverser::REMOVE_NODE`, in which | 345 The `leaveNode()` method can additionally return the value `NodeTraverser::REMOVE_NODE`, in which |
345 case the current node will be removed from the parent array. Furthermore it is possible to return | 346 case the current node will be removed from the parent array. Furthermore it is possible to return |
346 an array of nodes, which will be merged into the parent array at the offset of the current node. | 347 an array of nodes, which will be merged into the parent array at the offset of the current node. |
347 I.e. if in `array(A, B, C)` the node `B` should be replaced with `array(X, Y, Z)` the result will | 348 I.e. if in `array(A, B, C)` the node `B` should be replaced with `array(X, Y, Z)` the result will |