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
I encountered a problem with Visitor.visit() today. It does not support using both enter and leave on the root node. Here is a pull request that demonstrates the problem: #298. If I understand the problem correctly, this only happens to the root node because the isLeaving() tree that processes edits is never hit upon the final exit from the root node.
The visitor is a complex bunch of procedural code. Not sure how to proceed.
The text was updated successfully, but these errors were encountered:
It seems like this check exists exclusively for cases where the root node is edited, and if that's the case, then this fix might actually be correct. The 0th edit is the edit returned from enter and the 1st edit is the edit returned from leave. I used edits.length instead of 1, though.
Also, my added tests are up top just for ease of access. Can move them anywhere, or consolidate them into one test.
Hi,
I encountered a problem with
Visitor.visit()
today. It does not support using bothenter
andleave
on the root node. Here is a pull request that demonstrates the problem: #298. If I understand the problem correctly, this only happens to the root node because theisLeaving()
tree that processes edits is never hit upon the final exit from the root node.The visitor is a complex bunch of procedural code. Not sure how to proceed.
The text was updated successfully, but these errors were encountered: