-
Notifications
You must be signed in to change notification settings - Fork 14
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
Bump C3 tree-sitter parser to 0.2.3 #99
Conversation
Thanks! Just let me know when you feel is ready |
The fix seems to work, however, for some reason, the LSP is now consuming much more CPU on completion compared to the latest version's binary (obtained through nixpkgs). Is there a way to make an optimized build that I'm missing? (I'm using |
Mm now that you mention, go build says CGO could be optimized (cgo is the feature of compiling c code... which refers to the embedded treesitter library ) |
Now that I think about it, it's possible that it's just doing more work, because now it can parse the entirety of In comparison, the CPU usage seems to be roughly the same for a very simple project. Perhaps you can confirm this on your own projects? (I don't have many to test on) Still, it'd be nice to somehow solve this problem, of course. I wonder if it's somehow related to the usage of the |
I've found the problem :) |
Is this PR ready then? |
taking a look at the tree sitter grammar.js, a semicolon after 'inline Name' is required, otherwise it only produces an error node
no longer parses
it does not parse
ebada1e
to
da28d4b
Compare
Added unit tests and tested a bit more locally as well. Should be ready for merge 😄 |
Keeping it as draft before I run some simple usage tests.
Fixes #91
(fix yet to be confirmed).Applied suggestions from #91 (comment), except that I added a temporary fix for the AST convert function, where we parse
initializer_list
directly. That makes the test pass (although isn't a general fix for all cases).All tests are passing.