New Feature: NodeIterator #683
Labels
enhancement
New functionality or behavior
implemented
Change has been implemented
performance
Something could be made faster or more efficient
Milestone
Description
The
NodeWalker
we use today works well in some cases but is quite inefficient in other cases for the following reasons:NodeWalkerEvent
objectI'd therefore like to add a
NodeIterator
which offers the same simplified approach to looping through AST nodes but with the following features:In the best-case scenario, this should result in AST iteration times being cut in half since each node is only visited once instead of twice.
Example
Here's what the usage would look like in practice - notice how much of the boilerplate goes away!
The text was updated successfully, but these errors were encountered: