]>
git.saurik.com Git - wxWidgets.git/blob - contrib/src/stc/scintilla/src/LexOthers.cxx
6d537c9b6c2294e3200158f56738a9e2e35b58df
1 // Scintilla source code edit control
2 /** @file LexOthers.cxx
3 ** Lexers for batch files, diff results, properties files, make files and error lists.
4 ** Also lexer for LaTeX documents.
6 // Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
7 // The License.txt file describes the conditions under which this software may be distributed.
20 #include "Scintilla.h"
23 static bool Is0To9(char ch
) {
24 return (ch
>= '0') && (ch
<= '9');
27 static bool Is1To9(char ch
) {
28 return (ch
>= '1') && (ch
<= '9');
31 static inline bool AtEOL(Accessor
&styler
, unsigned int i
) {
32 return (styler
[i
] == '\n') ||
33 ((styler
[i
] == '\r') && (styler
.SafeGetCharAt(i
+ 1) != '\n'));
36 static void ColouriseBatchLine(
38 unsigned int lengthLine
,
39 unsigned int startLine
,
45 unsigned int state
= SCE_BAT_DEFAULT
;
47 while ((i
< lengthLine
) && isspacechar(lineBuffer
[i
])) { // Skip initial spaces
50 if (lineBuffer
[i
] == '@') { // Hide command (ECHO OFF)
51 styler
.ColourTo(startLine
+ i
, SCE_BAT_HIDE
);
53 while ((i
< lengthLine
) && isspacechar(lineBuffer
[i
])) { // Skip next spaces
57 if (lineBuffer
[i
] == ':') {
59 if (lineBuffer
[i
+ 1] == ':') {
60 // :: is a fake label, similar to REM, see http://content.techweb.com/winmag/columns/explorer/2000/21.htm
61 styler
.ColourTo(endPos
, SCE_BAT_COMMENT
);
62 } else { // Real label
63 styler
.ColourTo(endPos
, SCE_BAT_LABEL
);
66 // Check if initial word is a keyword
68 unsigned int wbl
= 0, offset
= i
;
69 // Copy word in buffer
70 for (; offset
< lengthLine
&& wbl
< 20 &&
71 !isspacechar(lineBuffer
[offset
]); wbl
++, offset
++) {
72 wordBuffer
[wbl
] = static_cast<char>(tolower(lineBuffer
[offset
]));
74 wordBuffer
[wbl
] = '\0';
75 // Check if it is a comment
76 if (CompareCaseInsensitive(wordBuffer
, "rem") == 0) {
77 styler
.ColourTo(endPos
, SCE_BAT_COMMENT
);
80 // Check if it is in the list
81 if (keywords
.InList(wordBuffer
)) {
82 styler
.ColourTo(startLine
+ offset
- 1, SCE_BAT_WORD
); // Regular keyword
84 // Search end of word (can be a long path)
85 while (offset
< lengthLine
&&
86 !isspacechar(lineBuffer
[offset
])) {
89 styler
.ColourTo(startLine
+ offset
- 1, SCE_BAT_COMMAND
); // External command / program
91 // Remainder of the line: colourise the variables.
93 while (offset
< lengthLine
) {
94 if (state
== SCE_BAT_DEFAULT
&& lineBuffer
[offset
] == '%') {
95 styler
.ColourTo(startLine
+ offset
- 1, state
);
96 if (Is0To9(lineBuffer
[offset
+ 1])) {
97 styler
.ColourTo(startLine
+ offset
+ 1, SCE_BAT_IDENTIFIER
);
99 } else if (lineBuffer
[offset
+ 1] == '%' &&
100 !isspacechar(lineBuffer
[offset
+ 2])) {
101 // Should be safe, as there is CRLF at the end of the line...
102 styler
.ColourTo(startLine
+ offset
+ 2, SCE_BAT_IDENTIFIER
);
105 state
= SCE_BAT_IDENTIFIER
;
107 } else if (state
== SCE_BAT_IDENTIFIER
&& lineBuffer
[offset
] == '%') {
108 styler
.ColourTo(startLine
+ offset
, state
);
109 state
= SCE_BAT_DEFAULT
;
110 } else if (state
== SCE_BAT_DEFAULT
&&
111 (lineBuffer
[offset
] == '*' ||
112 lineBuffer
[offset
] == '?' ||
113 lineBuffer
[offset
] == '=' ||
114 lineBuffer
[offset
] == '<' ||
115 lineBuffer
[offset
] == '>' ||
116 lineBuffer
[offset
] == '|')) {
117 styler
.ColourTo(startLine
+ offset
- 1, state
);
118 styler
.ColourTo(startLine
+ offset
, SCE_BAT_OPERATOR
);
122 // if (endPos > startLine + offset - 1) {
123 styler
.ColourTo(endPos
, SCE_BAT_DEFAULT
); // Remainder of line, currently not lexed
128 // ToDo: (not necessarily at beginning of line) GOTO, [IF] NOT, ERRORLEVEL
129 // IF [NO] (test) (command) -- test is EXIST (filename) | (string1)==(string2) | ERRORLEVEL (number)
130 // FOR %%(variable) IN (set) DO (command) -- variable is [a-zA-Z] -- eg for %%X in (*.txt) do type %%X
131 // ToDo: %n (parameters), %EnvironmentVariable% colourising
132 // ToDo: Colourise = > >> < | "
134 static void ColouriseBatchDoc(
135 unsigned int startPos
,
138 WordList
*keywordlists
[],
141 char lineBuffer
[1024];
142 WordList
&keywords
= *keywordlists
[0];
144 styler
.StartAt(startPos
);
145 styler
.StartSegment(startPos
);
146 unsigned int linePos
= 0;
147 unsigned int startLine
= startPos
;
148 for (unsigned int i
= startPos
; i
< startPos
+ length
; i
++) {
149 lineBuffer
[linePos
++] = styler
[i
];
150 if (AtEOL(styler
, i
) || (linePos
>= sizeof(lineBuffer
) - 1)) {
151 // End of line (or of line buffer) met, colourise it
152 lineBuffer
[linePos
] = '\0';
153 ColouriseBatchLine(lineBuffer
, linePos
, startLine
, i
, keywords
, styler
);
158 if (linePos
> 0) { // Last line does not have ending characters
159 ColouriseBatchLine(lineBuffer
, linePos
, startLine
, startPos
+ length
- 1,
164 static void ColouriseDiffLine(char *lineBuffer
, int endLine
, Accessor
&styler
) {
165 // It is needed to remember the current state to recognize starting
166 // comment lines before the first "diff " or "--- ". If a real
167 // difference starts then each line starting with ' ' is a whitespace
168 // otherwise it is considered a comment (Only in..., Binary file...)
169 if (0 == strncmp(lineBuffer
, "diff ", 3)) {
170 styler
.ColourTo(endLine
, SCE_DIFF_COMMAND
);
171 } else if (0 == strncmp(lineBuffer
, "--- ", 3)) {
172 styler
.ColourTo(endLine
, SCE_DIFF_HEADER
);
173 } else if (0 == strncmp(lineBuffer
, "+++ ", 3)) {
174 styler
.ColourTo(endLine
, SCE_DIFF_HEADER
);
175 } else if (0 == strncmp(lineBuffer
, "====", 4)) { // For p4's diff
176 styler
.ColourTo(endLine
, SCE_DIFF_HEADER
);
177 } else if (0 == strncmp(lineBuffer
, "***", 3)) {
178 styler
.ColourTo(endLine
, SCE_DIFF_HEADER
);
179 } else if (0 == strncmp(lineBuffer
, "? ", 2)) { // For difflib
180 styler
.ColourTo(endLine
, SCE_DIFF_HEADER
);
181 } else if (lineBuffer
[0] == '@') {
182 styler
.ColourTo(endLine
, SCE_DIFF_POSITION
);
183 } else if (lineBuffer
[0] == '-' || lineBuffer
[0] == '<') {
184 styler
.ColourTo(endLine
, SCE_DIFF_DELETED
);
185 } else if (lineBuffer
[0] == '+' || lineBuffer
[0] == '>') {
186 styler
.ColourTo(endLine
, SCE_DIFF_ADDED
);
187 } else if (lineBuffer
[0] != ' ') {
188 styler
.ColourTo(endLine
, SCE_DIFF_COMMENT
);
190 styler
.ColourTo(endLine
, SCE_DIFF_DEFAULT
);
194 static void ColouriseDiffDoc(unsigned int startPos
, int length
, int, WordList
*[], Accessor
&styler
) {
195 char lineBuffer
[1024];
196 styler
.StartAt(startPos
);
197 styler
.StartSegment(startPos
);
198 unsigned int linePos
= 0;
199 for (unsigned int i
= startPos
; i
< startPos
+ length
; i
++) {
200 lineBuffer
[linePos
++] = styler
[i
];
201 if (AtEOL(styler
, i
) || (linePos
>= sizeof(lineBuffer
) - 1)) {
202 // End of line (or of line buffer) met, colourise it
203 lineBuffer
[linePos
] = '\0';
204 ColouriseDiffLine(lineBuffer
, i
, styler
);
208 if (linePos
> 0) { // Last line does not have ending characters
209 ColouriseDiffLine(lineBuffer
, startPos
+ length
- 1, styler
);
213 static void ColourisePropsLine(
215 unsigned int lengthLine
,
216 unsigned int startLine
,
221 while ((i
< lengthLine
) && isspacechar(lineBuffer
[i
])) // Skip initial spaces
223 if (i
< lengthLine
) {
224 if (lineBuffer
[i
] == '#' || lineBuffer
[i
] == '!' || lineBuffer
[i
] == ';') {
225 styler
.ColourTo(endPos
, SCE_PROPS_COMMENT
);
226 } else if (lineBuffer
[i
] == '[') {
227 styler
.ColourTo(endPos
, SCE_PROPS_SECTION
);
228 } else if (lineBuffer
[i
] == '@') {
229 styler
.ColourTo(startLine
+ i
, SCE_PROPS_DEFVAL
);
230 if (lineBuffer
[++i
] == '=')
231 styler
.ColourTo(startLine
+ i
, SCE_PROPS_ASSIGNMENT
);
232 styler
.ColourTo(endPos
, SCE_PROPS_DEFAULT
);
234 // Search for the '=' character
235 while ((i
< lengthLine
) && (lineBuffer
[i
] != '='))
237 if ((i
< lengthLine
) && (lineBuffer
[i
] == '=')) {
238 styler
.ColourTo(startLine
+ i
- 1, SCE_PROPS_DEFAULT
);
239 styler
.ColourTo(startLine
+ i
, 3);
240 styler
.ColourTo(endPos
, SCE_PROPS_DEFAULT
);
242 styler
.ColourTo(endPos
, SCE_PROPS_DEFAULT
);
246 styler
.ColourTo(endPos
, SCE_PROPS_DEFAULT
);
250 static void ColourisePropsDoc(unsigned int startPos
, int length
, int, WordList
*[], Accessor
&styler
) {
251 char lineBuffer
[1024];
252 styler
.StartAt(startPos
);
253 styler
.StartSegment(startPos
);
254 unsigned int linePos
= 0;
255 unsigned int startLine
= startPos
;
256 for (unsigned int i
= startPos
; i
< startPos
+ length
; i
++) {
257 lineBuffer
[linePos
++] = styler
[i
];
258 if (AtEOL(styler
, i
) || (linePos
>= sizeof(lineBuffer
) - 1)) {
259 // End of line (or of line buffer) met, colourise it
260 lineBuffer
[linePos
] = '\0';
261 ColourisePropsLine(lineBuffer
, linePos
, startLine
, i
, styler
);
266 if (linePos
> 0) { // Last line does not have ending characters
267 ColourisePropsLine(lineBuffer
, linePos
, startLine
, startPos
+ length
- 1, styler
);
271 static void ColouriseMakeLine(
273 unsigned int lengthLine
,
274 unsigned int startLine
,
279 int lastNonSpace
= -1;
280 unsigned int state
= SCE_MAKE_DEFAULT
;
281 bool bSpecial
= false;
282 // Skip initial spaces
283 while ((i
< lengthLine
) && isspacechar(lineBuffer
[i
])) {
286 if (lineBuffer
[i
] == '#') { // Comment
287 styler
.ColourTo(endPos
, SCE_MAKE_COMMENT
);
290 if (lineBuffer
[i
] == '!') { // Special directive
291 styler
.ColourTo(endPos
, SCE_MAKE_PREPROCESSOR
);
294 while (i
< lengthLine
) {
295 if (lineBuffer
[i
] == '$' && lineBuffer
[i
+ 1] == '(') {
296 styler
.ColourTo(startLine
+ i
- 1, state
);
297 state
= SCE_MAKE_IDENTIFIER
;
298 } else if (state
== SCE_MAKE_IDENTIFIER
&& lineBuffer
[i
] == ')') {
299 styler
.ColourTo(startLine
+ i
, state
);
300 state
= SCE_MAKE_DEFAULT
;
303 if (lineBuffer
[i
] == ':') {
304 // We should check that no colouring was made since the beginning of the line,
305 // to avoid colouring stuff like /OUT:file
306 if (lastNonSpace
>= 0)
307 styler
.ColourTo(startLine
+ lastNonSpace
, SCE_MAKE_TARGET
);
308 styler
.ColourTo(startLine
+ i
- 1, SCE_MAKE_DEFAULT
);
309 styler
.ColourTo(startLine
+ i
, SCE_MAKE_OPERATOR
);
310 bSpecial
= true; // Only react to the first ':' of the line
311 state
= SCE_MAKE_DEFAULT
;
312 } else if (lineBuffer
[i
] == '=') {
313 if (lastNonSpace
>= 0)
314 styler
.ColourTo(startLine
+ lastNonSpace
, SCE_MAKE_IDENTIFIER
);
315 styler
.ColourTo(startLine
+ i
- 1, SCE_MAKE_DEFAULT
);
316 styler
.ColourTo(startLine
+ i
, SCE_MAKE_OPERATOR
);
317 bSpecial
= true; // Only react to the first '=' of the line
318 state
= SCE_MAKE_DEFAULT
;
321 if (!isspacechar(lineBuffer
[i
])) {
326 if (state
== SCE_MAKE_IDENTIFIER
) {
327 styler
.ColourTo(endPos
, SCE_MAKE_IDEOL
); // Error, variable reference not ended
329 styler
.ColourTo(endPos
, SCE_MAKE_DEFAULT
);
333 static void ColouriseMakeDoc(unsigned int startPos
, int length
, int, WordList
*[], Accessor
&styler
) {
334 char lineBuffer
[1024];
335 styler
.StartAt(startPos
);
336 styler
.StartSegment(startPos
);
337 unsigned int linePos
= 0;
338 unsigned int startLine
= startPos
;
339 for (unsigned int i
= startPos
; i
< startPos
+ length
; i
++) {
340 lineBuffer
[linePos
++] = styler
[i
];
341 if (AtEOL(styler
, i
) || (linePos
>= sizeof(lineBuffer
) - 1)) {
342 // End of line (or of line buffer) met, colourise it
343 lineBuffer
[linePos
] = '\0';
344 ColouriseMakeLine(lineBuffer
, linePos
, startLine
, i
, styler
);
349 if (linePos
> 0) { // Last line does not have ending characters
350 ColouriseMakeLine(lineBuffer
, linePos
, startLine
, startPos
+ length
- 1, styler
);
354 static bool strstart(char *haystack
, char *needle
) {
355 return strncmp(haystack
, needle
, strlen(needle
)) == 0;
358 static void ColouriseErrorListLine(
360 unsigned int lengthLine
,
361 // unsigned int startLine,
364 const int unRecognized
= 99;
365 if (lineBuffer
[0] == '>') {
366 // Command or return status
367 styler
.ColourTo(endPos
, SCE_ERR_CMD
);
368 } else if (lineBuffer
[0] == '<') {
369 // Diff removal, but not interested. Trapped to avoid hitting CTAG cases.
370 styler
.ColourTo(endPos
, SCE_ERR_DEFAULT
);
371 } else if (lineBuffer
[0] == '!') {
372 styler
.ColourTo(endPos
, SCE_ERR_DIFF_CHANGED
);
373 } else if (lineBuffer
[0] == '+') {
374 styler
.ColourTo(endPos
, SCE_ERR_DIFF_ADDITION
);
375 } else if (lineBuffer
[0] == '-' && lineBuffer
[1] == '-' && lineBuffer
[2] == '-') {
376 styler
.ColourTo(endPos
, SCE_ERR_DIFF_MESSAGE
);
377 } else if (lineBuffer
[0] == '-') {
378 styler
.ColourTo(endPos
, SCE_ERR_DIFF_DELETION
);
379 } else if (strstr(lineBuffer
, "File \"") && strstr(lineBuffer
, ", line ")) {
380 styler
.ColourTo(endPos
, SCE_ERR_PYTHON
);
381 } else if (strstr(lineBuffer
, " in ") && strstr(lineBuffer
, " on line ")) {
382 styler
.ColourTo(endPos
, SCE_ERR_PHP
);
383 } else if ((strstart(lineBuffer
, "Error ") ||
384 strstart(lineBuffer
, "Warning ")) &&
385 strstr(lineBuffer
, " at (") &&
386 strstr(lineBuffer
, ") : ") &&
387 (strstr(lineBuffer
, " at (") < strstr(lineBuffer
, ") : "))) {
388 // Intel Fortran Compiler error/warning message
389 styler
.ColourTo(endPos
, SCE_ERR_IFC
);
390 } else if (strstart(lineBuffer
, "Error ")) {
391 // Borland error message
392 styler
.ColourTo(endPos
, SCE_ERR_BORLAND
);
393 } else if (strstart(lineBuffer
, "Warning ")) {
394 // Borland warning message
395 styler
.ColourTo(endPos
, SCE_ERR_BORLAND
);
396 } else if (strstr(lineBuffer
, "at line " ) &&
397 (strstr(lineBuffer
, "at line " ) < (lineBuffer
+ lengthLine
)) &&
398 strstr(lineBuffer
, "file ") &&
399 (strstr(lineBuffer
, "file ") < (lineBuffer
+ lengthLine
))) {
401 styler
.ColourTo(endPos
, SCE_ERR_LUA
);
402 } else if (strstr(lineBuffer
, " at " ) &&
403 (strstr(lineBuffer
, " at " ) < (lineBuffer
+ lengthLine
)) &&
404 strstr(lineBuffer
, " line ") &&
405 (strstr(lineBuffer
, " line ") < (lineBuffer
+ lengthLine
)) &&
406 (strstr(lineBuffer
, " at " ) < (strstr(lineBuffer
, " line ")))) {
407 // perl error message
408 styler
.ColourTo(endPos
, SCE_ERR_PERL
);
409 } else if ((memcmp(lineBuffer
, " at ", 6) == 0) &&
410 strstr(lineBuffer
, ":line ")) {
412 styler
.ColourTo(endPos
, SCE_ERR_NET
);
413 } else if (strstart(lineBuffer
, "Line ") &&
414 strstr(lineBuffer
, ", file ")) {
415 // Essential Lahey Fortran error message
416 styler
.ColourTo(endPos
, SCE_ERR_ELF
);
418 // Look for GCC <filename>:<line>:message
419 // Look for Microsoft <filename>(line) :message
420 // Look for Microsoft <filename>(line,pos)message
421 // Look for CTags \tmessage
423 for (unsigned int i
= 0; i
< lengthLine
; i
++) {
424 char ch
= lineBuffer
[i
];
426 if ((i
+1) < lengthLine
)
427 chNext
= lineBuffer
[i
+1];
431 if ((chNext
!= '\\') && (chNext
!= '/')) {
432 // This check is not completely accurate as may be on
433 // GTK+ with a file name that includes ':'.
436 } else if ((ch
== '(') && Is1To9(chNext
)) {
438 // Check againt '0' often removes phone numbers
440 } else if (ch
== '\t') {
444 } else if (state
== 1) {
445 state
= Is1To9(ch
) ? 2 : unRecognized
;
446 } else if (state
== 2) {
448 state
= 3; // :9.*: is GCC
450 } else if (!Is0To9(ch
)) {
451 state
= unRecognized
;
453 } else if (state
== 10) {
454 state
= Is0To9(ch
) ? 11 : unRecognized
;
455 } else if (state
== 11) {
458 } else if (ch
== ')') {
460 } else if ((ch
!= ' ') && !Is0To9(ch
)) {
461 state
= unRecognized
;
463 } else if (state
== 12) {
464 if ((ch
== ' ') && (chNext
== ':'))
467 state
= unRecognized
;
468 } else if (state
== 14) {
472 } else if ((ch
!= ' ') && !Is0To9(ch
)) {
473 state
= unRecognized
;
475 } else if (state
== 20) {
476 if ((lineBuffer
[i
-1] == '\t') &&
477 ((ch
== '/' && lineBuffer
[i
+1] == '^') || Is0To9(ch
))) {
480 } else if ((ch
== '/') && (lineBuffer
[i
+1] == '^')) {
483 } else if ((state
== 21) && ((lineBuffer
[i
] == '$') && (lineBuffer
[i
+1] == '/'))) {
489 styler
.ColourTo(endPos
, SCE_ERR_GCC
);
490 } else if ((state
== 13) || (state
== 14) || (state
== 15)) {
491 styler
.ColourTo(endPos
, SCE_ERR_MS
);
492 } else if (((state
== 22) || (state
== 24)) && (lineBuffer
[0] != '\t')) {
493 styler
.ColourTo(endPos
, SCE_ERR_CTAG
);
495 styler
.ColourTo(endPos
, SCE_ERR_DEFAULT
);
500 static void ColouriseErrorListDoc(unsigned int startPos
, int length
, int, WordList
*[], Accessor
&styler
) {
501 char lineBuffer
[1024];
502 styler
.StartAt(startPos
);
503 styler
.StartSegment(startPos
);
504 unsigned int linePos
= 0;
505 for (unsigned int i
= startPos
; i
< startPos
+ length
; i
++) {
506 lineBuffer
[linePos
++] = styler
[i
];
507 if (AtEOL(styler
, i
) || (linePos
>= sizeof(lineBuffer
) - 1)) {
508 // End of line (or of line buffer) met, colourise it
509 lineBuffer
[linePos
] = '\0';
510 ColouriseErrorListLine(lineBuffer
, linePos
, i
, styler
);
514 if (linePos
> 0) { // Last line does not have ending characters
515 ColouriseErrorListLine(lineBuffer
, linePos
, startPos
+ length
- 1, styler
);
519 static int isSpecial(char s
) {
520 return (s
== '\\') || (s
== ',') || (s
== ';') || (s
== '\'') || (s
== ' ') ||
521 (s
== '\"') || (s
== '`') || (s
== '^') || (s
== '~');
524 static int isTag(int start
, Accessor
&styler
) {
526 unsigned int i
= 0, e
= 1;
528 s
[i
] = styler
[start
+ i
];
530 e
= styler
[start
+ i
] != '{';
533 return (strcmp(s
, "begin") == 0) || (strcmp(s
, "end") == 0);
536 static void ColouriseLatexDoc(unsigned int startPos
, int length
, int initStyle
,
537 WordList
*[], Accessor
&styler
) {
539 styler
.StartAt(startPos
);
541 int state
= initStyle
;
542 char chNext
= styler
[startPos
];
543 styler
.StartSegment(startPos
);
544 int lengthDoc
= startPos
+ length
;
546 for (int i
= startPos
; i
< lengthDoc
; i
++) {
548 chNext
= styler
.SafeGetCharAt(i
+ 1);
550 if (styler
.IsLeadByte(ch
)) {
551 chNext
= styler
.SafeGetCharAt(i
+ 2);
559 styler
.ColourTo(i
- 1, state
);
560 if (isSpecial(styler
[i
+ 1])) {
561 styler
.ColourTo(i
+ 1, SCE_L_COMMAND
);
563 chNext
= styler
.SafeGetCharAt(i
+ 1);
565 if (isTag(i
+ 1, styler
))
568 state
= SCE_L_COMMAND
;
572 styler
.ColourTo(i
- 1, state
);
576 chNext
= styler
.SafeGetCharAt(i
+ 1);
580 styler
.ColourTo(i
- 1, state
);
581 state
= SCE_L_COMMENT
;
586 if (chNext
== '[' || chNext
== '{' || chNext
== '}' ||
587 chNext
== ' ' || chNext
== '\r' || chNext
== '\n') {
588 styler
.ColourTo(i
, state
);
589 state
= SCE_L_DEFAULT
;
591 chNext
= styler
.SafeGetCharAt(i
+ 1);
596 styler
.ColourTo(i
, state
);
597 state
= SCE_L_DEFAULT
;
604 chNext
= styler
.SafeGetCharAt(i
+ 1);
606 styler
.ColourTo(i
, state
);
607 state
= SCE_L_DEFAULT
;
611 if (ch
== '\r' || ch
== '\n') {
612 styler
.ColourTo(i
- 1, state
);
613 state
= SCE_L_DEFAULT
;
617 styler
.ColourTo(lengthDoc
-1, state
);
620 static const char * const batchWordListDesc
[] = {
625 static const char * const emptyWordListDesc
[] = {
629 LexerModule
lmBatch(SCLEX_BATCH
, ColouriseBatchDoc
, "batch", 0, batchWordListDesc
);
630 LexerModule
lmDiff(SCLEX_DIFF
, ColouriseDiffDoc
, "diff", 0, emptyWordListDesc
);
631 LexerModule
lmProps(SCLEX_PROPERTIES
, ColourisePropsDoc
, "props", 0, emptyWordListDesc
);
632 LexerModule
lmMake(SCLEX_MAKEFILE
, ColouriseMakeDoc
, "makefile", 0, emptyWordListDesc
);
633 LexerModule
lmErrorList(SCLEX_ERRORLIST
, ColouriseErrorListDoc
, "errorlist", 0, emptyWordListDesc
);
634 LexerModule
lmLatex(SCLEX_LATEX
, ColouriseLatexDoc
, "latex", 0, emptyWordListDesc
);