aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/KeyWords.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2005-08-30 11:07:33 +0000
committernyamatongwe <unknown>2005-08-30 11:07:33 +0000
commit4f8c51ef2e37f152640afa8565716435b256172c (patch)
tree1f359ea0977818f6efbafb8d5c5d2fbfa7bdd473 /src/KeyWords.cxx
parent203b397eb52cbdd7355e00006adb489780378307 (diff)
downloadscintilla-mirror-4f8c51ef2e37f152640afa8565716435b256172c.tar.gz
Added StyleBitsNeeded property and implemented to return 5 for all lexers
except HTML, XML, ... (7) and Ruby (6).
Diffstat (limited to 'src/KeyWords.cxx')
-rw-r--r--src/KeyWords.cxx18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/KeyWords.cxx b/src/KeyWords.cxx
index d1b9614e5..f932b877e 100644
--- a/src/KeyWords.cxx
+++ b/src/KeyWords.cxx
@@ -22,14 +22,18 @@
const LexerModule *LexerModule::base = 0;
int LexerModule::nextLanguage = SCLEX_AUTOMATIC+1;
-LexerModule::LexerModule(int language_, LexerFunction fnLexer_,
- const char *languageName_, LexerFunction fnFolder_,
- const char * const wordListDescriptions_[]) :
+LexerModule::LexerModule(int language_,
+ LexerFunction fnLexer_,
+ const char *languageName_,
+ LexerFunction fnFolder_,
+ const char * const wordListDescriptions_[],
+ int styleBits_) :
language(language_),
fnLexer(fnLexer_),
fnFolder(fnFolder_),
wordListDescriptions(wordListDescriptions_),
- languageName(languageName_) {
+ languageName(languageName_),
+ styleBits(styleBits_) {
next = base;
base = this;
if (language == SCLEX_AUTOMATIC) {
@@ -52,7 +56,7 @@ int LexerModule::GetNumWordLists() const {
}
}
-const char * LexerModule::GetWordListDescription(int index) const {
+const char *LexerModule::GetWordListDescription(int index) const {
static const char *emptyStr = "";
PLATFORM_ASSERT(index < GetNumWordLists());
@@ -63,6 +67,10 @@ const char * LexerModule::GetWordListDescription(int index) const {
}
}
+int LexerModule::GetStyleBitsNeeded() const {
+ return styleBits;
+}
+
const LexerModule *LexerModule::Find(int language) {
const LexerModule *lm = base;
while (lm) {