| 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 <[email protected]> |
| 6 |
// The License.txt file describes the conditions under which this software may be distributed. |
| 7 |
|
| 8 |
#include <stdlib.h> |
| 9 |
#include <string.h> |
| 10 |
#include <stdio.h> |
| 11 |
#include <stdarg.h> |
| 12 |
#include <assert.h> |
| 13 |
#include <ctype.h> |
| 14 |
|
| 15 |
#include <string> |
| 16 |
#include <string_view> |
| 17 |
|
| 18 |
#include "ILexer.h" |
| 19 |
#include "Scintilla.h" |
| 20 |
#include "SciLexer.h" |
| 21 |
|
| 22 |
#include "WordList.h" |
| 23 |
#include "LexAccessor.h" |
| 24 |
#include "Accessor.h" |
| 25 |
#include "StyleContext.h" |
| 26 |
#include "CharacterSet.h" |
| 27 |
#include "LexerModule.h" |
| 28 |
|
| 29 |
using namespace Lexilla; |
| 30 |
|
| 31 |
static void ColouriseNullDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], |
| 32 |
Accessor &styler) { |
| 33 |
// Null language means all style bytes are 0 so just mark the end - no need to fill in. |
| 34 |
if (length > 0) { |
| 35 |
styler.StartAt(startPos + length - 1); |
| 36 |
styler.StartSegment(startPos + length - 1); |
| 37 |
styler.ColourTo(startPos + length - 1, 0); |
| 38 |
} |
| 39 |
} |
| 40 |
|
| 41 |
extern const LexerModule lmNull(SCLEX_NULL, ColouriseNullDoc, "null"); |