aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ExternalLexer.h
diff options
context:
space:
mode:
authornyamatongwe <unknown>2010-07-13 21:38:26 +1000
committernyamatongwe <unknown>2010-07-13 21:38:26 +1000
commit46a09069e0fd52a121d8a5d6655d513d28198061 (patch)
tree78913d3187df5083bb4a2e8239ec598321b2597f /src/ExternalLexer.h
parent4a42ef938d5cc3b13f42b4a3f4e7310a6b5cbf4b (diff)
downloadscintilla-mirror-46a09069e0fd52a121d8a5d6655d513d28198061.tar.gz
Files changed for new lexer design.
Diffstat (limited to 'src/ExternalLexer.h')
-rw-r--r--src/ExternalLexer.h19
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.