-
-
Notifications
You must be signed in to change notification settings - Fork 442
add function replace_nodes
to Tree
#1524
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
base: master
Are you sure you want to change the base?
Conversation
This can be used to replace tokens in a `Tree` that satisfy a specified rule.
Add tests. |
added 388fd80 |
Let's call it Also in the tests, you are changing |
*deepcopy |
|
@MegaIng Do we really need the special behavior for None? The callback can just return the parameter as is, if no changes are necessary. (I don't think it matters in terms of performance) |
True, probably not needed. To get the type checking to work:
This slightly changes the semantics, but I think it's more useful. |
…30/lark into feat/add_replace_node_func
|
This can be used to replace tokens in a
Tree
that satisfy a specified rule.