-
-
Notifications
You must be signed in to change notification settings - Fork 374
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
Python syntax tree broken after edit that should have no effect #487
Comments
marijnh
added a commit
to lezer-parser/lr
that referenced
this issue
May 14, 2021
FIX: Fix a bug with overeager reuse of nodes on change boundaries. Issue codemirror/dev#487
That was indeed a bug in the incremental parsing. Upgrading to lezer 0.13.5 should help. |
microbit-matt-hillsdon
added a commit
to microbit-foundation/python-editor-v3
that referenced
this issue
May 17, 2021
This should fix codemirror/dev#487 (comment) which is the cause of #113
microbit-matt-hillsdon
added a commit
to microbit-foundation/python-editor-v3
that referenced
this issue
May 17, 2021
This addresses codemirror/dev#487 (comment) Closes #113
I've confirmed that 0.13.5 fixes the reproduction above and my more involved original scenario. Thank you. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using lang-python, start with this program:
Delete the "else: pass" part. Reinstate it as it was.
Note that the syntax tree now has what I think are error nodes and is different from the original syntax tree.
Original syntax tree toString():
Syntax tree toString() after:
There's a sandbox here with a reproduction that dumps out the syntax tree in a debug view plugin:
https://codesandbox.io/s/python-if-else-bug-xs85w
It was hard to further minimise the code. The length of the comment and the function call seemed to be significant, so I wondered whether it might be an incremental parse issue of some sort.
The text was updated successfully, but these errors were encountered: