diff options
author | nyamatongwe <unknown> | 2001-06-12 04:16:05 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2001-06-12 04:16:05 +0000 |
commit | 3954e9315e7f759975626e51107741b29438839e (patch) | |
tree | 65490b18c1ada769f52e7f621f000cd2b11e0698 | |
parent | 3cdce44ddeb99d0eaa5426c867cc4efbc1b48638 (diff) | |
download | scintilla-mirror-3954e9315e7f759975626e51107741b29438839e.tar.gz |
Additions from Shane Caraveo at ActiveState to add a PHP operator
lexical class.
-rw-r--r-- | include/SciLexer.h | 1 | ||||
-rw-r--r-- | include/Scintilla.iface | 1 | ||||
-rw-r--r-- | src/LexHTML.cxx | 7 |
3 files changed, 8 insertions, 1 deletions
diff --git a/include/SciLexer.h b/include/SciLexer.h index 24a9b8978..9af9abeb0 100644 --- a/include/SciLexer.h +++ b/include/SciLexer.h @@ -168,6 +168,7 @@ #define SCE_HPHP_COMMENT 124 #define SCE_HPHP_COMMENTLINE 125 #define SCE_HPHP_HSTRING_VARIABLE 126 +#define SCE_HPHP_OPERATOR 127 #define SCE_PL_DEFAULT 0 #define SCE_PL_ERROR 1 #define SCE_PL_COMMENTLINE 2 diff --git a/include/Scintilla.iface b/include/Scintilla.iface index 80579f27c..c810c3d9d 100644 --- a/include/Scintilla.iface +++ b/include/Scintilla.iface @@ -1370,6 +1370,7 @@ val SCE_HPHP_VARIABLE=123 val SCE_HPHP_COMMENT=124 val SCE_HPHP_COMMENTLINE=125 val SCE_HPHP_HSTRING_VARIABLE=126 +val SCE_HPHP_OPERATOR=127 # Lexical states for SCLEX_PERL val SCE_PL_DEFAULT=0 val SCE_PL_ERROR=1 diff --git a/src/LexHTML.cxx b/src/LexHTML.cxx index 8f3b7f6c8..f7ef6cd48 100644 --- a/src/LexHTML.cxx +++ b/src/LexHTML.cxx @@ -1174,6 +1174,8 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty state = SCE_HPHP_SIMPLESTRING; } else if (ch == '$') { state = SCE_HPHP_VARIABLE; + } else if (isoperator(ch)) { + state = SCE_HPHP_OPERATOR; } else { state = SCE_HPHP_DEFAULT; } @@ -1231,7 +1233,8 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty state = SCE_HPHP_HSTRING; } break; - case SCE_HPHP_DEFAULT: + case SCE_HPHP_OPERATOR: + case SCE_HPHP_DEFAULT: styler.ColourTo(i - 1, StateToPrint); if (isdigit(ch)) { state = SCE_HPHP_NUMBER; @@ -1251,6 +1254,8 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty state = SCE_HPHP_SIMPLESTRING; } else if (ch == '$') { state = SCE_HPHP_VARIABLE; + } else if (isoperator(ch)) { + state = SCE_HPHP_OPERATOR; } break; ///////////// end - PHP state handling |