-
Notifications
You must be signed in to change notification settings - Fork 30
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
Some comments cause vscode to hang since 1.11.6 #260
Comments
I'll look into this today as well, @scriptxotic thanks for reporting this and thanks for narrowing it down. |
After modifying perf to print the line before it tries that pattern it seems that the grammar gets stuck at 3943 or |
my guess is that this has to do with |
The simplest fix would be to move the comment pattern near the top, right? And modify it to consume leading spaces. |
Yeah, I'm hoping that will solve the problem. I'm also going to try to make the inline comment pattern more efficient |
@scriptxotic it should be fixed now in @matter123 I started adding the leading spaces but it didn't seem to be doing much and in some cases it was making the code incorrect. What I did instead that seems to have fixed it, is update the legacy comment patterns and have the block comment consume the leading spaces. This makes the block comment take precedence over the other patterns that are trying to match an inline block comment. I also made the inline comment really efficient (no backtracking at all) but it actually didn't affect much either. |
@jeff-hykin I rewrote the comment pattern in the branch Fix/#260. In particular I removed the nested pattern ranges and made the banner patterns more generic. You might want to merge some of that in |
Yup 👍 I'll do that |
Thank you! You two are doing a great job! |
All in the title.
Small repro:
The text was updated successfully, but these errors were encountered: