Merge pull request #2212 from TwlyY29/bibtex-parser
[geany-mirror.git] / scintilla / lexers / LexNull.cxx
blob15a3a50aae0154f2fd3b01d56ed00da158e8d778
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 using namespace Scintilla;
28 static void ColouriseNullDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[],
29 Accessor &styler) {
30 // Null language means all style bytes are 0 so just mark the end - no need to fill in.
31 if (length > 0) {
32 styler.StartAt(startPos + length - 1);
33 styler.StartSegment(startPos + length - 1);
34 styler.ColourTo(startPos + length - 1, 0);
38 LexerModule lmNull(SCLEX_NULL, ColouriseNullDoc, "null");