--- a/lexers/LexECL.cxx
+++ b/lexers/LexECL.cxx
@@ -47,10 +47,19 @@
 #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[],