From d4d3f82cc71c64c05ce6efdcb61164092da51c2b Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 13 Jul 2010 21:38:26 +1000 Subject: Files changed for new lexer design. --- src/ExternalLexer.h | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'src/ExternalLexer.h') 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. -- cgit v1.2.3