Skip to content
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

Is Treesitter Overkill for Our Requirements? #182

Open
binhtran432k opened this issue Jan 31, 2024 · 1 comment
Open

Is Treesitter Overkill for Our Requirements? #182

binhtran432k opened this issue Jan 31, 2024 · 1 comment
Labels
🏦 debt Tech debt

Comments

@binhtran432k
Copy link
Member

🤔 What's the problem you've observed?

While Treesitter offers certain parsing capabilities, its current stage of development can introduce challenges that may outweigh its benefits for our specific needs. Notably, the significant size of its WASM parsers (~90% of the language service bundle) seems redundant considering our primary need is simply extracting text strings (easily achievable with Javascript regex).

✨ Do you have a proposal for making it better?

I suggest that we use a simple regex solution, such as VSCucumberAutoComplete. Alternatively, we can explore other parser generators like peg.js, langium, lezer (treesitter-like in pure JavaScript), etc.

📚 Any additional context?

This solution addresses nearly all issues associated with Treesitter, including those related to non-functionality in Node versions 19 and above.


This text was originally generated from a template, then edited by hand. You can modify the template here.

@binhtran432k binhtran432k added the 🏦 debt Tech debt label Jan 31, 2024
@helgardferreira
Copy link

Yeah, with the current tree-sitter parsing setup, the language service is falling short of VSCucumberAutoComplete unfortunately.

I'm not sure if it's the version that this project is using, or what exactly, but the parsing isn't even matching with the tree-sitter playground currently. For instance, try parsing a typescript file that uses class decorators and you'll see the parser fail arbitrarily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏦 debt Tech debt
Projects
None yet
Development

No branches or pull requests

2 participants