diff options
author | nyamatongwe <unknown> | 2005-05-16 01:25:33 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2005-05-16 01:25:33 +0000 |
commit | 814640ca9388062c5a5d8c1d8afaf3b977ca8c1b (patch) | |
tree | ebd3fc898027194069e7b7a29faf65d8d594458b /src/LexHTML.cxx | |
parent | 9aac6410693f26f8c2b110cbd73641453123fe03 (diff) | |
download | scintilla-mirror-814640ca9388062c5a5d8c1d8afaf3b977ca8c1b.tar.gz |
Patch from Robert Roessler allows hexadecimal literals in PHP.
Diffstat (limited to 'src/LexHTML.cxx')
-rw-r--r-- | src/LexHTML.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/LexHTML.cxx b/src/LexHTML.cxx index 5c06276ad..372effdc7 100644 --- a/src/LexHTML.cxx +++ b/src/LexHTML.cxx @@ -1512,7 +1512,10 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty } break; case SCE_HPHP_NUMBER: - if (!IsADigit(ch) && ch != '.' && ch != 'e' && ch != 'E' && (ch != '-' || (chPrev != 'e' && chPrev != 'E'))) { + // recognize bases 8,10 or 16 integers OR floating-point numbers + if (!IsADigit(ch) + && strchr(".xXabcdefABCDEF", ch) == NULL + && ((ch != '-' && ch != '+') || (chPrev != 'e' && chPrev != 'E'))) { styler.ColourTo(i - 1, SCE_HPHP_NUMBER); if (isoperator(ch)) state = SCE_HPHP_OPERATOR; |