-
Notifications
You must be signed in to change notification settings - Fork 31
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
fleche: fix terminator tokens #136
Conversation
Why remove |
Try |
@ejgallego I would like to understand the role of terminator tokens. As it stands, my assumptions are anything we can consider terminating a Coq "sentence". This is why the removal of such tokens doesn't make sense to me. However, if the role of these tokens is otherwise, we should make that clear in the code. |
The code is clear: we're just matching against the next token on |
First, I see 3 quite different kind of changes in this PR, that makes review pretty hard, please submit one PR for each change. The parsing recovery heuristic is just a heuristic, however I'm unsure I understand the problem here, in particular why to remove |
Actually seeing your comment about If you have coq-lsp loading in a file ssreflect, and then trying to parse a different file, you'll get plenty of errors. Can you confirm the weird stuff happens after you restart the server with just one file open? |
Add "end", and remove BULLET.
I've re-added |
The file should check without errors, are you sure it is not the problem I mentioned above? |
Yeah, it seems flaky; seemed to work better with my patch at the time of writing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm afraid the issue that @artagnon has seen is orthogonal to this patch.
Files failing to parse properly is due to some yet unsolved bug with coq-lsp or Coq management of the parsing state.
Tok.BULLET
is a valid (and worthwhile) parsing recovery point and should not be removed from the heuristic.
In particular @artagnon parsing will go mad when coq-lsp loads the ssreflect plugin in some other buffer, but the bug is general. |
Restarting |
That bug is actually driving me crazy, I can reproduce reliably by loading Maybe |
Does this patch help? |
Nack, it doesn't. I just checked. |
See coq/coq#12575 (comment) , somehow sometimes keywords disappear and that's what causes the problem, in particular you say that |
Add "end", and remove "..." and BULLET.