Theme improvements (#1382)
[geany-mirror.git] / scintilla / lexers / LexNull.cxx
blob34876775d77cb0b8924b7d2c882ed46db2ac152f
1 // Scintilla source code edit control
2 /** @file LexNull.cxx
3 ** Lexer for no language. Used for plain text and unrecognized files.
4 **/
5 // Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
6 // The License.txt file describes the conditions under which this software may be distributed.
8 #include <stdlib.h>
9 #include <string.h>
10 #include <stdio.h>
11 #include <stdarg.h>
12 #include <assert.h>
13 #include <ctype.h>
15 #include "ILexer.h"
16 #include "Scintilla.h"
17 #include "SciLexer.h"
19 #include "WordList.h"
20 #include "LexAccessor.h"
21 #include "Accessor.h"
22 #include "StyleContext.h"
23 #include "CharacterSet.h"
24 #include "LexerModule.h"
26 #ifdef SCI_NAMESPACE
27 using namespace Scintilla;
28 #endif
30 static void ColouriseNullDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[],
31 Accessor &styler) {
32 // Null language means all style bytes are 0 so just mark the end - no need to fill in.
33 if (length > 0) {
34 styler.StartAt(startPos + length - 1);
35 styler.StartSegment(startPos + length - 1);
36 styler.ColourTo(startPos + length - 1, 0);
40 LexerModule lmNull(SCLEX_NULL, ColouriseNullDoc, "null");