aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexlib/StyleContext.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'lexlib/StyleContext.cxx')
-rw-r--r--lexlib/StyleContext.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/lexlib/StyleContext.cxx b/lexlib/StyleContext.cxx
index 5bcacb018..f9f15be2e 100644
--- a/lexlib/StyleContext.cxx
+++ b/lexlib/StyleContext.cxx
@@ -16,11 +16,28 @@
#include "LexAccessor.h"
#include "Accessor.h"
#include "StyleContext.h"
+#include "CharacterSet.h"
#ifdef SCI_NAMESPACE
using namespace Scintilla;
#endif
+bool StyleContext::MatchIgnoreCase(const char *s) {
+ if (MakeLowerCase(ch) != static_cast<unsigned char>(*s))
+ return false;
+ s++;
+ if (MakeLowerCase(chNext) != static_cast<unsigned char>(*s))
+ return false;
+ s++;
+ for (int n = 2; *s; n++) {
+ if (static_cast<unsigned char>(*s) !=
+ MakeLowerCase(static_cast<unsigned char>(styler.SafeGetCharAt(currentPos + n, 0))))
+ return false;
+ s++;
+ }
+ return true;
+}
+
static void getRange(Sci_PositionU start,
Sci_PositionU end,
LexAccessor &styler,