-
-
Notifications
You must be signed in to change notification settings - Fork 425
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
Add Tree.find_token() method #1467
Conversation
I put this method outside of "standalone" scope as it uses |
@erezsh ready for review. |
Overall looks good. A few requests:
|
I changed @erezsh ready for review. |
Sorry it tooks me this long to reply! It slipped my memory. I think it's better to keep it as isinstance(.., Token). |
The logic in pretty is a little different. P.S. if you don't have time right now, let me know, and I'll make the change for you. |
Thank you so much, @erezsh! This change is pretty simple, added it to PR. |
Looks good, however I would also like to see a test for what happens if there is a leaf node that isn't a |
@MegaIng Thank you for the hint. I added a non-token item at the end of the tree. As expected, it didn't affect the result. |
Thanks! |
Resolves #1466.