LexerNoExceptions.h 1.1 KB

123456789101112131415161718192021222324252627282930313233
  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. #ifndef LEXERNOEXCEPTIONS_H
  8. #define LEXERNOEXCEPTIONS_H
  9. #ifdef SCI_NAMESPACE
  10. namespace Scintilla {
  11. #endif
  12. // A simple lexer with no state
  13. class LexerNoExceptions : public LexerBase {
  14. public:
  15. // TODO Also need to prevent exceptions in constructor and destructor
  16. Sci_Position SCI_METHOD PropertySet(const char *key, const char *val);
  17. Sci_Position SCI_METHOD WordListSet(int n, const char *wl);
  18. void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess);
  19. void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *);
  20. virtual void Lexer(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess, Accessor &styler) = 0;
  21. virtual void Folder(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess, Accessor &styler) = 0;
  22. };
  23. #ifdef SCI_NAMESPACE
  24. }
  25. #endif
  26. #endif