]>
git.saurik.com Git - wxWidgets.git/blob - src/stc/scintilla/lexlib/LexerBase.cxx
1 // Scintilla source code edit control
2 /** @file LexerSimple.cxx
3 ** A simple lexer with no state.
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"
27 using namespace Scintilla
;
30 LexerBase::LexerBase() {
31 for (int wl
= 0; wl
< numWordLists
; wl
++)
32 keyWordLists
[wl
] = new WordList
;
33 keyWordLists
[numWordLists
] = 0;
36 LexerBase::~LexerBase() {
37 for (int wl
= 0; wl
< numWordLists
; wl
++) {
38 delete keyWordLists
[wl
];
41 keyWordLists
[numWordLists
] = 0;
44 void SCI_METHOD
LexerBase::Release() {
48 int SCI_METHOD
LexerBase::Version() const {
52 const char * SCI_METHOD
LexerBase::PropertyNames() {
56 int SCI_METHOD
LexerBase::PropertyType(const char *) {
57 return SC_TYPE_BOOLEAN
;
60 const char * SCI_METHOD
LexerBase::DescribeProperty(const char *) {
64 int SCI_METHOD
LexerBase::PropertySet(const char *key
, const char *val
) {
65 const char *valOld
= props
.Get(key
);
66 if (strcmp(val
, valOld
) != 0) {
74 const char * SCI_METHOD
LexerBase::DescribeWordListSets() {
78 int SCI_METHOD
LexerBase::WordListSet(int n
, const char *wl
) {
79 if (n
< numWordLists
) {
82 if (*keyWordLists
[n
] != wlNew
) {
83 keyWordLists
[n
]->Set(wl
);
90 void * SCI_METHOD
LexerBase::PrivateCall(int, void *) {