You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should consider introducing a walker in AGTree that supports two callbacks: one when entering a node and another when leaving it. This will provide a structured way to traverse the tree while allowing custom logic at different stages of traversal.
Implementing a walker would be beneficial in multiple areas, such as the linter and modifiers, especially as we enable more advanced parsing of values. It would offer a reusable and consistent approach to tree traversal, reducing redundancy in related features.
Additionally, the walker should support early termination, allowing traversal to stop when a specific condition is met (e.g., when searching for a particular node). It should also provide an option to skip specific subtrees, such as ignoring comment nodes and preventing their child nodes from being processed.
By introducing this walker, we can improve efficiency, maintainability, and flexibility when working with AGTree.
The text was updated successfully, but these errors were encountered:
We should consider introducing a walker in AGTree that supports two callbacks: one when entering a node and another when leaving it. This will provide a structured way to traverse the tree while allowing custom logic at different stages of traversal.
Implementing a walker would be beneficial in multiple areas, such as the linter and modifiers, especially as we enable more advanced parsing of values. It would offer a reusable and consistent approach to tree traversal, reducing redundancy in related features.
Additionally, the walker should support early termination, allowing traversal to stop when a specific condition is met (e.g., when searching for a particular node). It should also provide an option to skip specific subtrees, such as ignoring comment nodes and preventing their child nodes from being processed.
By introducing this walker, we can improve efficiency, maintainability, and flexibility when working with AGTree.
The text was updated successfully, but these errors were encountered: