Recognize .exp (Expect) files as Tcl
[geany-mirror.git] / scintilla / lexlib / WordList.h
blob382be2812be21ae13340f56e02fdeb52e5842298
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 // Each word contains at least one character - a empty word acts as sentinel at the end.
19 char **words;
20 char *list;
21 int len;
22 bool onlyLineEnds; ///< Delimited by any white space or only line ends
23 int starts[256];
24 public:
25 explicit WordList(bool onlyLineEnds_ = false);
26 ~WordList();
27 operator bool() const;
28 bool operator!=(const WordList &other) const;
29 int Length() const;
30 void Clear();
31 void Set(const char *s);
32 bool InList(const char *s) const;
33 bool InListAbbreviated(const char *s, const char marker) const;
34 const char *WordAt(int n) const;
37 #ifdef SCI_NAMESPACE
39 #endif
41 #endif