[Gambas-user] Need help with TextEditor

Benoît Minisini g4mba5 at gmail.com
Wed Sep 15 20:06:29 CEST 2021


Le 15/09/2021 à 12:31, Bruce Steers a écrit :
> You need to study the gb.eval.highlight component.
> http://gambaswiki.org/wiki/comp/gb.eval.highlight 
> <http://gambaswiki.org/wiki/comp/gb.eval.highlight>
> 
> You can see how it's used in gambas syntax highlighting by studying the 
> TextEditorMode_Style classes in the gb.form.editor component
> https://gitlab.com/gambas/gambas/-/tree/master/comp/src/gb.form.editor/.src 
> <https://gitlab.com/gambas/gambas/-/tree/master/comp/src/gb.form.editor/.src>
> 
> 
> I made the TextEditorMode_Sh.class and it was a real head scratcher.
> 

Yes, and it misses some shell syntaxes. :-)

I'd like to make a parser generator in Gambas, where you define the 
syntax highlighting in a declarative way, and it compiles it into 
highlighting code.

Writing highlighters would be simpler then.

-- 
Benoît Minisini


More information about the User mailing list