From 4f8c51ef2e37f152640afa8565716435b256172c Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 30 Aug 2005 11:07:33 +0000 Subject: Added StyleBitsNeeded property and implemented to return 5 for all lexers except HTML, XML, ... (7) and Ruby (6). --- include/KeyWords.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'include/KeyWords.h') diff --git a/include/KeyWords.h b/include/KeyWords.h index cc81b73df..059ac0da0 100644 --- a/include/KeyWords.h +++ b/include/KeyWords.h @@ -20,15 +20,19 @@ protected: LexerFunction fnLexer; LexerFunction fnFolder; const char * const * wordListDescriptions; + int styleBits; static const LexerModule *base; static int nextLanguage; public: const char *languageName; - LexerModule(int language_, LexerFunction fnLexer_, - const char *languageName_=0, LexerFunction fnFolder_=0, - const char * const wordListDescriptions_[] = NULL); + LexerModule(int language_, + LexerFunction fnLexer_, + const char *languageName_=0, + LexerFunction fnFolder_=0, + const char * const wordListDescriptions_[] = NULL, + int styleBits_=5); virtual ~LexerModule() { } int GetLanguage() const { return language; } @@ -37,6 +41,8 @@ public: int GetNumWordLists() const; const char *GetWordListDescription(int index) const; + int GetStyleBitsNeeded() const; + virtual void Lex(unsigned int startPos, int lengthDoc, int initStyle, WordList *keywordlists[], Accessor &styler) const; virtual void Fold(unsigned int startPos, int lengthDoc, int initStyle, -- cgit v1.2.3