Miscellaneous improvements to the behavior and documentation of Visitor, Transformer, Interpreter, and friends#1543
Conversation
Can you explain this comment? Interpreter.top_down() would just use the |
|
Ah, I think I misinterpreted the behavior and jumped to the wrong conclusion. Is the behavior of |
|
@nchammas Well, I can see how it was confusing. But I don't think adding |
|
Maybe it would be better to remove the |
|
@erezsh - No rush; just wanted to check in again if I can do anything to move this PR forward. |
|
Hi @erezsh - Is there anything I can do to move this PR forward, including reducing the scope? If not, happy to just close it. |
|
Hi @nchammas , sorry, I was a bit distracted with other projects. I'll try to allocate some time for Lark soon. Do I have your permission to take the parts I like and leave out the rest? Some of the edits might remove the authorship marker from the commits, but I'll try to avoid it. |
Sure, go ahead. I have the "Allow edits by maintainers" thing enabled on this PR, so you can just push commits here if that's easiest for you. |
also tweak new test for decorator use
|
@erezsh - I've trimmed the nebulous changes to |
|
That looks good! I rephrased one line. If you agree with it, then I think we're good to merge. |
|
LGTM! |
|
Thanks for improving the docs! Sorry it took me this long. |
|
No worries at all. Glad we got it merged. |
This PR makes the following improvements.
Documentation:
visit_children_decorand various methods ofInterpreter.Visitorto clarify that it can traverse the tree in either direction.visit_children_decor, which was previously not visible.Behavior:
visit_children_decorraise aTypeErrorif applied to a method of any class other thanInterpreter.