]>
git.saurik.com Git - wxWidgets.git/blob - src/stc/scintilla/lexlib/LexerNoExceptions.cxx
1 // Scintilla source code edit control
2 /** @file LexerNoExceptions.cxx
3 ** A simple lexer with no state which does not throw exceptions so can be used in an external lexer.
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.
16 #include "Scintilla.h"
19 #include "PropSetSimple.h"
21 #include "LexAccessor.h"
23 #include "LexerModule.h"
24 #include "LexerBase.h"
25 #include "LexerNoExceptions.h"
28 using namespace Scintilla
;
31 int SCI_METHOD
LexerNoExceptions::PropertySet(const char *key
, const char *val
) {
33 return LexerBase::PropertySet(key
, val
);
35 // Should not throw into caller as may be compiled with different compiler or options
40 int SCI_METHOD
LexerNoExceptions::WordListSet(int n
, const char *wl
) {
42 return LexerBase::WordListSet(n
, wl
);
44 // Should not throw into caller as may be compiled with different compiler or options
49 void SCI_METHOD
LexerNoExceptions::Lex(unsigned int startPos
, int length
, int initStyle
, IDocument
*pAccess
) {
51 Accessor
astyler(pAccess
, &props
);
52 Lexer(startPos
, length
, initStyle
, pAccess
, astyler
);
55 // Should not throw into caller as may be compiled with different compiler or options
56 pAccess
->SetErrorStatus(SC_STATUS_FAILURE
);
59 void SCI_METHOD
LexerNoExceptions::Fold(unsigned int startPos
, int length
, int initStyle
, IDocument
*pAccess
) {
61 Accessor
astyler(pAccess
, &props
);
62 Folder(startPos
, length
, initStyle
, pAccess
, astyler
);
65 // Should not throw into caller as may be compiled with different compiler or options
66 pAccess
->SetErrorStatus(SC_STATUS_FAILURE
);