Skip to content

Add tree walk function #105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 10, 2024
Merged

Add tree walk function #105

merged 2 commits into from
Sep 10, 2024

Conversation

Pennycook
Copy link
Contributor

Related issues

Progress towards #101.

Proposed changes

  • Add walk() function to SourceTree and Node to iterate over descendant nodes.
  • Add a simple test of the new walk() function.

Intended as a general replacement for TreeWalker classes that only
need to visit the tree via a preorder traversal.

This covers a lot of common cases (e.g., printing the tree).

Signed-off-by: John Pennycook <john.pennycook@intel.com>
@Pennycook Pennycook added the enhancement New feature or request label Sep 4, 2024
@Pennycook Pennycook added this to the 2.0.0 milestone Sep 4, 2024
Signed-off-by: John Pennycook <john.pennycook@intel.com>
@Pennycook Pennycook merged commit a1a9199 into intel:main Sep 10, 2024
3 checks passed
@Pennycook Pennycook deleted the tree-walk branch September 10, 2024 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants