aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2013-06-27 16:45:17 +1000
committernyamatongwe <devnull@localhost>2013-06-27 16:45:17 +1000
commit455b52e2bdf28cdc04884a9dc672200690880a23 (patch)
treebcaab7374b7d3f3c697e26001da4d5f59267620d
parent8f73c9a20e3c6fac0444151205119187038d1156 (diff)
downloadscintilla-mirror-455b52e2bdf28cdc04884a9dc672200690880a23.tar.gz
Bug: [#1491]. Regular expression detection code appeared incorrect.
-rw-r--r--lexers/LexECL.cxx17
1 files changed, 13 insertions, 4 deletions
diff --git a/lexers/LexECL.cxx b/lexers/LexECL.cxx
index cf15a62a5..6a08d58c2 100644
--- a/lexers/LexECL.cxx
+++ b/lexers/LexECL.cxx
@@ -47,10 +47,19 @@ using namespace Scintilla;
#endif
static bool IsSpaceEquiv(int state) {
- return (state <= SCE_ECL_COMMENTDOC) ||
- // including SCE_ECL_DEFAULT, SCE_ECL_COMMENT, SCE_ECL_COMMENTLINE
- (state == SCE_ECL_COMMENTLINEDOC) || (state == SCE_ECL_COMMENTDOCKEYWORD) ||
- (state == SCE_ECL_COMMENTDOCKEYWORDERROR);
+ switch (state) {
+ case SCE_ECL_DEFAULT:
+ case SCE_ECL_COMMENT:
+ case SCE_ECL_COMMENTLINE:
+ case SCE_ECL_COMMENTLINEDOC:
+ case SCE_ECL_COMMENTDOCKEYWORD:
+ case SCE_ECL_COMMENTDOCKEYWORDERROR:
+ case SCE_ECL_COMMENTDOC:
+ return true;
+
+ default:
+ return false;
+ }
}
static void ColouriseEclDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[],