diff options
Diffstat (limited to 'src/ExternalLexer.h')
-rw-r--r-- | src/ExternalLexer.h | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/src/ExternalLexer.h b/src/ExternalLexer.h index eb2bad5d1..98d543ef1 100644 --- a/src/ExternalLexer.h +++ b/src/ExternalLexer.h @@ -18,22 +18,15 @@ namespace Scintilla { #endif -// External Lexer function definitions... -typedef void (EXT_LEXER_DECL *ExtLexerFunction)(unsigned int lexer, unsigned int startPos, int length, int initStyle, - char *words[], WindowID window, char *props); -typedef void (EXT_LEXER_DECL *ExtFoldFunction)(unsigned int lexer, unsigned int startPos, int length, int initStyle, - char *words[], WindowID window, char *props); typedef void*(EXT_LEXER_DECL *GetLexerFunction)(unsigned int Index); typedef int (EXT_LEXER_DECL *GetLexerCountFn)(); typedef void (EXT_LEXER_DECL *GetLexerNameFn)(unsigned int Index, char *name, int buflength); - -//class DynamicLibrary; +typedef LexerFactoryFunction(EXT_LEXER_DECL *GetLexerFactoryFunction)(unsigned int Index); /// Sub-class of LexerModule to use an external lexer. -class ExternalLexerModule : protected LexerModule { +class ExternalLexerModule : public LexerModule { protected: - ExtLexerFunction fneLexer; - ExtFoldFunction fneFolder; + GetLexerFactoryFunction fneFactory; int externalLanguage; char name[100]; public: @@ -43,11 +36,7 @@ public: name[sizeof(name)-1] = '\0'; languageName = name; } - 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, - WordList *keywordlists[], Accessor &styler) const; - virtual void SetExternal(ExtLexerFunction fLexer, ExtFoldFunction fFolder, int index); + virtual void SetExternal(GetLexerFactoryFunction fFactory, int index); }; /// LexerMinder points to an ExternalLexerModule - so we don't leak them. |