From c1bbb58a0b1f5bb352acf67afbae8d40e99e22eb Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 13 Apr 2001 05:19:52 +0000 Subject: Added a string name to each lexer. Made it possible for LexerModule to be subclassed so that its Lex and Fold methods can be specialised to work across DLL boundaries. --- include/KeyWords.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/KeyWords.h') diff --git a/include/KeyWords.h b/include/KeyWords.h index 43de26fe6..869b59d26 100644 --- a/include/KeyWords.h +++ b/include/KeyWords.h @@ -14,6 +14,7 @@ typedef void (*LexerFunction)(unsigned int startPos, int lengthDoc, int initStyl * module appropriate to a particular language. */ class LexerModule { +protected: LexerModule *next; int language; const char *languageName; @@ -27,9 +28,9 @@ public: LexerModule(int language_, LexerFunction fnLexer_, const char *languageName_=0, LexerFunction fnFolder_=0); int GetLanguage() { return language; } - void Lex(unsigned int startPos, int lengthDoc, int initStyle, + virtual void Lex(unsigned int startPos, int lengthDoc, int initStyle, WordList *keywordlists[], Accessor &styler); - void Fold(unsigned int startPos, int lengthDoc, int initStyle, + virtual void Fold(unsigned int startPos, int lengthDoc, int initStyle, WordList *keywordlists[], Accessor &styler); static LexerModule *Find(int language); static LexerModule *Find(const char *languageName); -- cgit v1.2.3