[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Highlight.Analize and other things
[Thread Prev] | [Thread Next]
- Subject: Re: Highlight.Analize and other things
- From: Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
- Date: Sat, 14 Nov 2026 19:22:25 +0100
- To: user@xxxxxxxxxxxxxxxxxxxxxx
Le 14/11/2026 à 15:53, Bruce Steers a écrit :
So now i have 2 alternatives after using the TextEditor.GetHighlight() methodIf aTypes[0] = Highlight.Comment ' for gambas code If aTypes[0] = Highlight["Comment"] ' for othersIf aTypes[0] = Highlight["Shebang"] ' now both 19 on my shell scripts. (i was confused here as Highlight.Datatype constant is 19 so this was where things were wrong for me)It seems the _get method getting TextHighlighter constants cannot be used with gambas files, they are incompatible.As for example Highlight["Comment"] = 6 and Highlight.Comment = 9I assume being a Static function the TextHighlighterTheme.GetStateIndex(State) results ar generic and the same for all the different highlighters?Respects BruceS
State integer values are dynamic. They change according to the order in which each highlighter is compiled.
By the way I think this leads to a problem with highlighter JIT compilation, because then the result of the compilation depends on the order in which the highlighter is loaded in the current process. So the cache is actually used only for the same highlighters loaded in same order. Weird!
I will think about a solution. Or maybe not a solution, but some code reorganization that leads to less JIT compilation time, and better JIT cache use.
Regards, -- Benoît Minisini.
| Re: Highlight.Analize and other things | Bruce Steers <bsteers4@xxxxxxxxx> |
| Highlight.Analize and other things | Bruce Steers <bsteers4@xxxxxxxxx> |
| Re: Highlight.Analize and other things | Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> |
| Re: Highlight.Analize and other things | Bruce Steers <bsteers4@xxxxxxxxx> |
| Re: Highlight.Analize and other things | Bruce Steers <bsteers4@xxxxxxxxx> |