-
Notifications
You must be signed in to change notification settings - Fork 108
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
tsx parser stuck in an infinite loop #265
Comments
I suspect that this is a problem in tree-sitter itself. Probably better to file an issue there. |
Nvm, I was thinking of another case similar to this one where the issue is in the scanner, this is not the case and is an upstream bug |
Did you end up filing an upstream bug or resolving the issue? I am running into issues on M1 mac where neovim freezes when opening a tsx file with treesitter highlighting enabled. An infinite loop is the only reasonable explanation I can find. |
Any workaround of this problem ? |
@sebcode I made a plethora of changes in the javascript parser as well as this one. Can you try it out now? If it's still stuck I'll reopen this but I'm hopeful I potentially fixed it. |
@amaanq The tsx parser still seems to hang :( This is how I tested:
If I run |
Sorry about that, I can still reproduce. I fixed another case I believe - I'll try and fix this as well |
Spoke too soon Alright, I actually found the fix this time, I'll be updating js and ts for import attribute support and more, so hopefully in a couple hrs we'll see this actually fixed. |
Okay @sebcode, can you try 0.20.5? :) |
@amaanq This seems to work! Tested a few cases and nvim doesn't hang anymore. Thanks a lot!! 🥳 |
tree-sitter parse
gets stuck in an infinite loop with the following code:Tested with b1bf482
This related issue has a more verbose test-case: nvim-treesitter/nvim-treesitter#3550
The text was updated successfully, but these errors were encountered: