updated Scintilla to 2.29
[TortoiseGit.git] / ext / scintilla / lexlib / WordList.h
blob4ce0246b1b58c466e4d9bcaff6687a885fc82262
1 // Scintilla source code edit control
2 /** @file WordList.h
3 ** Hold a list of words.
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.
8 #ifndef WORDLIST_H
9 #define WORDLIST_H
11 #ifdef SCI_NAMESPACE
12 namespace Scintilla {
13 #endif
15 /**
17 class WordList {
18 public:
19 // Each word contains at least one character - a empty word acts as sentinel at the end.
20 char **words;
21 char *list;
22 int len;
23 bool onlyLineEnds; ///< Delimited by any white space or only line ends
24 int starts[256];
25 WordList(bool onlyLineEnds_ = false) :
26 words(0), list(0), len(0), onlyLineEnds(onlyLineEnds_)
28 ~WordList() { Clear(); }
29 operator bool() const { return len ? true : false; }
30 bool operator!=(const WordList &other) const;
31 void Clear();
32 void Set(const char *s);
33 bool InList(const char *s) const;
34 bool InListAbbreviated(const char *s, const char marker) const;
37 #ifdef SCI_NAMESPACE
39 #endif
41 #endif