Darren Schroeder wrote:
I need to syntax highlight cpp files that have only one word in them. They're valid cpp keywords like 'long' but, in that example, if there are only those four chars in the file it doesn't get highlighted. If I put a space or a carriage return then of course it gets highlighted but for my purpose I can't put any extra chars in the file. Any idea how to overcome this obstacle?
I expect you will need to change the lexer... but you might want to think about that.
From my own perspective, this is something of a design issue with lexers (or syntax-colorers) in general: one style is to not attempt recognition of tokens [as anything special] until a "definite" delimiter is seen.
This has the "advantage" that a short token like "if" is not initially seen as a keyword, but then changed *back* to an identifier when the user finishes what they were typing ("if_eof")... the drawback being that a token is *not* recognized/colored until a delimiter is seen.
The other style (obviously) is where token recognition is attempted as every character is seen - which would solve your problem, but... ;)
Robert Roessler [EMAIL PROTECTED] http://www.rftp.com _______________________________________________ Scintilla-interest mailing list [email protected] http://mailman.lyra.org/mailman/listinfo/scintilla-interest
