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

Feature Request: Language pack with Lezer #1

Open
sh-cho opened this issue May 26, 2024 · 1 comment
Open

Feature Request: Language pack with Lezer #1

sh-cho opened this issue May 26, 2024 · 1 comment
Labels
enhancement New feature or request refactoring

Comments

@sh-cho
Copy link

sh-cho commented May 26, 2024

Maybe it's an overkill, but I think it's good to have parser based on Lezer
Looks like gdscript lezer is implemented (https://www.npmjs.com/package/@gdquest/lezer-gdscript)

(ref: https://codemirror.net/examples/lang-package/)

@RobTheFiveNine
Copy link
Owner

I might look into this, as it looks like a much cleaner solution than using regex. Looking at that package (lezer-gdscript), it looks like it is missing quite a lot of stuff from GDScript, so I don't think that package would help replicate the current state of the plugin.

If I can get Lezer to handle some of the use cases where multiple steps of processing need to be carried out to do the highlighting (the stack pushing/popping part in the code) then I'll see if I can get it implemented, as it might help work around some of the limitations of CodeMirror's regex parsing (namely that you can't use the \b quantifier at the start of a pattern).

@RobTheFiveNine RobTheFiveNine added enhancement New feature or request refactoring labels May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactoring
Projects
None yet
Development

No branches or pull requests

2 participants