Open sh-cho opened 6 months ago
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).
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/)