1
0
mirror of https://github.com/danog/PHP-Parser.git synced 2024-12-13 01:47:22 +01:00
Commit Graph

14 Commits

Author SHA1 Message Date
nikic
d7407af87d Remove unused variable 2012-03-03 17:01:28 +01:00
nikic
2ed6cac7c1 Don't traverse nodes merged by another visitor
If a NodeVisitor returns an array of nodes to merge these will no longer be traversed by all other visitors. That "feature" turned out to be a real pain in the ass on some occasions ;)
2012-03-03 16:50:45 +01:00
nikic
b49c55c9e5 Cover NodeTraverser and bugs it found
a) ->traverseNode() now operates on a clone of the node, otherwise the original node will be modified too
b) before nodes were passed to the following visitor unchanged, even though they were already changed in the tree
2011-12-02 17:52:03 +01:00
nikic
c7c94f38f1 Stop using ArrayObject for nodes
Instead manually implement IteratorAggregate and define the required magic methods. The reasoning behind this is:
a) Extending ArrayObject is always risky, because a lot of magic which is known to be buggy is involved
b) This allows to lateron change the implementation for the nodes altogether, for example it could be changed to using real public fields instead of a $subNodes array.
2011-10-28 23:12:32 +02:00
nikic
d53173c2f3 Don't use references in NodeTraverser
Stop using reference magic in the NodeTraverser. Instead use normal return values. Additionally enfore that an array is passed to ->traverse().
2011-09-24 23:39:05 +02:00
nikic
a551bbc5a4 Add PHPParser_Node interface 2011-09-21 21:43:19 +02:00
nikic
393221ce63 Some minor improvements (performance and exception wise) for the node traverser 2011-08-31 21:19:31 +02:00
nikic
63525d36e7 Fix / improve some method doc docomments / signatures 2011-08-22 17:38:05 +02:00
nikic
9cc2cf322b Iterate replacement nodes using all visitors apart from the one having made the replacement 2011-08-20 16:16:59 +02:00
nikic
299893066d Fix NodeTraverser by putting to-be-deleted and to-be-merged nodes into the same queue. Additionally do not further iterate queued nodes. 2011-08-19 17:19:27 +02:00
nikic
567f7c3536 Add possibility to delete and merge nodes in traverser 2011-08-09 12:32:18 +02:00
nikic
f00701fd8a Use classes for visitors 2011-08-09 09:28:58 +02:00
nikic
962c4dc0f0 Add some more unit tests 2011-07-13 23:07:05 +02:00
nikic
43b537f9f9 add NodeTraverser 2011-07-12 18:07:59 +02:00