]>
git.saurik.com Git - wxWidgets.git/blob - contrib/src/stc/scintilla/include/KeyWords.h
1 // SciTE - Scintilla based Text Editor
2 // KeyWords.h - colourise for particular languages
3 // Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
4 // The License.txt file describes the conditions under which this software may be distributed.
6 typedef void (*LexerFunction
)(unsigned int startPos
, int lengthDoc
, int initStyle
,
7 WordList
*keywordlists
[], Accessor
&styler
);
10 static LexerModule
*base
;
15 LexerModule(int language_
, LexerFunction fn_
);
16 static void Colourise(unsigned int startPos
, int lengthDoc
, int initStyle
,
17 int language
, WordList
*keywordlists
[], Accessor
&styler
);
20 inline bool iswordchar(char ch
) {
21 return isalnum(ch
) || ch
== '.' || ch
== '_';
24 inline bool iswordstart(char ch
) {
25 return isalnum(ch
) || ch
== '_';
28 inline bool isoperator(char ch
) {
31 // '.' left out as it is used to make up numbers
32 if (ch
== '%' || ch
== '^' || ch
== '&' || ch
== '*' ||
33 ch
== '(' || ch
== ')' || ch
== '-' || ch
== '+' ||
34 ch
== '=' || ch
== '|' || ch
== '{' || ch
== '}' ||
35 ch
== '[' || ch
== ']' || ch
== ':' || ch
== ';' ||
36 ch
== '<' || ch
== '>' || ch
== ',' || ch
== '/' ||
37 ch
== '?' || ch
== '!' || ch
== '.' || ch
== '~')