I can at least apply this patch.
Quick test: it works! :-)
I expect it to become official.
Cool... please make sure that the indents get changed back to Tab chars - I made them spaces just so they would "fit" in the message.
I always do that anyway, as I am not sure mail program keeps tabs...
Yup, Scintilla lexers are not full parsers for the languages they color... OTOH, I am happier when they at least work properly for LEGAL input! :)
Indeed...
Creating this quick patch for you made me see a "funny" case that is not handled correctly: "0xEE+4" *should* be seen as a hex int, a "+" operator, and a decimal int... but it isn't by any lexer that doesn't track exactly what it is tokenizing.
Yes, it would be rather easy to handle that, but it would need to have additional states for different kinds of numerical constants. Now, in most cases, these states can be purely internal, as user can be moderately interested in different styles for decimal or hexadecimal numbers.
In fact, I examined LexCaml, and realized that even though it *does* know what kind of numeric literal it is seeing, it was NOT disallowing the above case: an exponent on a hex int... it has been fixed. :)
Perhaps we can apply this kind of change to other lexers. Or perhaps we don't care. Note I usually write: 0xEE + 4, so I don't get any problem...
-- Philippe Lhoste -- (near) Paris -- France -- http://Phi.Lho.free.fr -- -- -- -- -- -- -- -- -- -- -- -- -- -- _______________________________________________ Scintilla-interest mailing list [email protected] http://mailman.lyra.org/mailman/listinfo/scintilla-interest
