| 1 | // Scintilla source code edit control |
| 2 | /** @file LexerNoExceptions.h |
| 3 | ** A simple lexer with no state. |
| 4 | **/ |
| 5 | // Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org> |
| 6 | // The License.txt file describes the conditions under which this software may be distributed. |
| 7 | |
| 8 | #ifndef LEXERNOEXCEPTIONS_H |
| 9 | #define LEXERNOEXCEPTIONS_H |
| 10 | |
| 11 | namespace Lexilla { |
| 12 | |
| 13 | // A simple lexer with no state |
| 14 | class LexerNoExceptions : public LexerBase { |
| 15 | public: |
| 16 | // TODO Also need to prevent exceptions in constructor and destructor |
| 17 | Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override; |
| 18 | Sci_Position SCI_METHOD WordListSet(int n, const char *wl) override; |
| 19 | void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, Scintilla::IDocument *pAccess) override; |
| 20 | void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, Scintilla::IDocument *) override; |
| 21 | |
| 22 | virtual void Lexer(Sci_PositionU startPos, Sci_Position length, int initStyle, Scintilla::IDocument *pAccess, Accessor &styler) = 0; |
| 23 | virtual void Folder(Sci_PositionU startPos, Sci_Position length, int initStyle, Scintilla::IDocument *pAccess, Accessor &styler) = 0; |
| 24 | }; |
| 25 | |
| 26 | } |
| 27 | |
| 28 | #endif |
| 29 | |