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