aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/LexHTML.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2005-05-16 01:25:33 +0000
committernyamatongwe <unknown>2005-05-16 01:25:33 +0000
commit814640ca9388062c5a5d8c1d8afaf3b977ca8c1b (patch)
treeebd3fc898027194069e7b7a29faf65d8d594458b /src/LexHTML.cxx
parent9aac6410693f26f8c2b110cbd73641453123fe03 (diff)
downloadscintilla-mirror-814640ca9388062c5a5d8c1d8afaf3b977ca8c1b.tar.gz
Patch from Robert Roessler allows hexadecimal literals in PHP.
Diffstat (limited to 'src/LexHTML.cxx')
-rw-r--r--src/LexHTML.cxx5
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;