Philippe Lhoste wrote:
Still working on LexAHK.cxx, doing a major refactoring...
...
So, is there already some clean way to change the style of an arbitrary
text segment? If no, is there a clean way to implement it in
DocumentAccessor? Or do I have to mess at lower level?
You might look at the LexCaml source - specifically, the handling for
the SCE_CAML_IDENTIFIER case element.
Whenever it looks like we have hit a token which *could* be either an
identifier *or* a keyword, it is initially colored as an identifier.
Then, when we come to the end of the token, we check to see if it has
a match in any of the 3 keyword lists. If so, then we recolor it (by
changing the state/color) as a keyword of the appropriate color.
While this is not doing "backtracking" per se, recall that in the
"interactive" case, the lexers are presented the entire line each time
the user makes a change to that line (along with the state coming into
that line to cover multi-line syntactic constructs).
Note the above is a simplification of what "really" happens... ;)
Robert Roessler
[EMAIL PROTECTED]
http://www.rftp.com
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest