Merge branch 'scintilla-update-342'
[geany-mirror.git] / src / highlightingmappings.h
blob898578f95cfd7e105849de1a3061cc9c85746e27
1 /*
2 * highlightingmappings.h - this file is part of Geany, a fast and lightweight IDE
4 * Copyright 2005-2012 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
5 * Copyright 2006-2012 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
6 * Copyright 2011-2012 Colomban Wendling <ban(at)herbesfolles(dot)org>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 #ifndef GEANY_HIGHLIGHTINGMAPPINGS_H
25 #define GEANY_HIGHLIGHTINGMAPPINGS_H 1
27 #include "Scintilla.h"
30 /* contains all filtypes informations in the form of:
31 * - highlighting_lexer_LANG: the SCI lexer
32 * - highlighting_styles_LANG: SCI style/named style mappings. The first
33 * item is also used for the default style.
34 * - highlighting_keywords_LANG: keywords ID/name mappings
35 * - highlighting_properties_LANG: default SCI properties and their value
36 * where LANG is the lang part from GEANY_FILETYPE_LANG
38 * Using this scheme makes possible to automate style setup by simply listing LANG
39 * and let [init_]styleset_case() macros (in highlighting.c) prepare the correct
40 * calls.
44 typedef struct
46 guint style; /* SCI style */
47 const gchar *name; /* style name in the filetypes.* file */
48 gboolean fill_eol; /* whether to set EOLFILLED flag to this style */
49 } HLStyle;
51 typedef struct
53 guint id; /* SCI keyword ID */
54 const gchar *key; /* keywords entry name in the filetypes.* file */
55 gboolean merge; /* whether to merge with session types */
56 } HLKeyword;
58 typedef struct
60 const gchar *property;
61 const gchar *value;
62 } HLProperty;
65 #define EMPTY_KEYWORDS ((HLKeyword *) NULL)
66 #define EMPTY_PROPERTIES ((HLProperty *) NULL)
68 /* like G_N_ELEMENTS() but supports @array being NULL (for empty entries) */
69 #define HL_N_ENTRIES(array) ((array != NULL) ? G_N_ELEMENTS(array) : 0)
72 /* Abaqus */
73 #define highlighting_lexer_ABAQUS SCLEX_ABAQUS
74 static const HLStyle highlighting_styles_ABAQUS[] =
76 { SCE_ABAQUS_DEFAULT, "default", FALSE },
77 { SCE_ABAQUS_COMMENT, "comment", FALSE },
78 { SCE_ABAQUS_NUMBER, "number", FALSE },
79 { SCE_ABAQUS_STRING, "string", FALSE },
80 { SCE_ABAQUS_OPERATOR, "operator", FALSE },
81 { SCE_ABAQUS_PROCESSOR, "processor", FALSE },
82 { SCE_ABAQUS_STARCOMMAND, "starcommand", FALSE },
83 { SCE_ABAQUS_ARGUMENT, "argument", FALSE }
85 static const HLKeyword highlighting_keywords_ABAQUS[] =
87 { 0, "processors", FALSE },
88 { 1, "commands", FALSE },
89 { 2, "slashommands", FALSE },
90 { 3, "starcommands", FALSE },
91 { 4, "arguments", FALSE },
92 { 5, "functions", FALSE }
94 #define highlighting_properties_ABAQUS EMPTY_PROPERTIES
97 /* Ada */
98 #define highlighting_lexer_ADA SCLEX_ADA
99 static const HLStyle highlighting_styles_ADA[] =
101 { SCE_ADA_DEFAULT, "default", FALSE },
102 { SCE_ADA_WORD, "word", FALSE },
103 { SCE_ADA_IDENTIFIER, "identifier", FALSE },
104 { SCE_ADA_NUMBER, "number", FALSE },
105 { SCE_ADA_DELIMITER, "delimiter", FALSE },
106 { SCE_ADA_CHARACTER, "character", FALSE },
107 { SCE_ADA_CHARACTEREOL, "charactereol", FALSE },
108 { SCE_ADA_STRING, "string", FALSE },
109 { SCE_ADA_STRINGEOL, "stringeol", FALSE },
110 { SCE_ADA_LABEL, "label", FALSE },
111 { SCE_ADA_COMMENTLINE, "commentline", FALSE },
112 { SCE_ADA_ILLEGAL, "illegal", FALSE }
114 static const HLKeyword highlighting_keywords_ADA[] =
116 { 0, "primary", FALSE }
118 #define highlighting_properties_ADA EMPTY_PROPERTIES
121 /* ActionScript */
122 #define highlighting_lexer_AS SCLEX_CPP
123 #define highlighting_styles_AS highlighting_styles_C
124 static const HLKeyword highlighting_keywords_AS[] =
126 { 0, "primary", FALSE },
127 { 1, "secondary", FALSE },
128 { 3, "classes", FALSE }
130 #define highlighting_properties_AS highlighting_properties_C
133 /* ASM */
134 #define highlighting_lexer_ASM SCLEX_ASM
135 static const HLStyle highlighting_styles_ASM[] =
137 { SCE_ASM_DEFAULT, "default", FALSE },
138 { SCE_ASM_COMMENT, "comment", FALSE },
139 { SCE_ASM_NUMBER, "number", FALSE },
140 { SCE_ASM_STRING, "string", FALSE },
141 { SCE_ASM_OPERATOR, "operator", FALSE },
142 { SCE_ASM_IDENTIFIER, "identifier", FALSE },
143 { SCE_ASM_CPUINSTRUCTION, "cpuinstruction", FALSE },
144 { SCE_ASM_MATHINSTRUCTION, "mathinstruction", FALSE },
145 { SCE_ASM_REGISTER, "register", FALSE },
146 { SCE_ASM_DIRECTIVE, "directive", FALSE },
147 { SCE_ASM_DIRECTIVEOPERAND, "directiveoperand", FALSE },
148 { SCE_ASM_COMMENTBLOCK, "commentblock", FALSE },
149 { SCE_ASM_CHARACTER, "character", FALSE },
150 { SCE_ASM_STRINGEOL, "stringeol", FALSE },
151 { SCE_ASM_EXTINSTRUCTION, "extinstruction", FALSE },
152 { SCE_ASM_COMMENTDIRECTIVE, "commentdirective", FALSE }
154 static const HLKeyword highlighting_keywords_ASM[] =
156 { 0, "instructions", FALSE },
157 /*{ 1, "instructions", FALSE },*/
158 { 2, "registers", FALSE },
159 { 3, "directives", FALSE }
160 /*{ 5, "instructions", FALSE }*/
162 #define highlighting_properties_ASM EMPTY_PROPERTIES
165 /* BASIC */
166 #define highlighting_lexer_BASIC SCLEX_FREEBASIC
167 static const HLStyle highlighting_styles_BASIC[] =
169 { SCE_B_DEFAULT, "default", FALSE },
170 { SCE_B_COMMENT, "comment", FALSE },
171 { SCE_B_COMMENTBLOCK, "commentblock", FALSE },
172 { SCE_B_DOCLINE, "docline", FALSE },
173 { SCE_B_DOCBLOCK, "docblock", FALSE },
174 { SCE_B_DOCKEYWORD, "dockeyword", FALSE },
175 { SCE_B_NUMBER, "number", FALSE },
176 { SCE_B_KEYWORD, "word", FALSE },
177 { SCE_B_STRING, "string", FALSE },
178 { SCE_B_PREPROCESSOR, "preprocessor", FALSE },
179 { SCE_B_OPERATOR, "operator", FALSE },
180 { SCE_B_IDENTIFIER, "identifier", FALSE },
181 { SCE_B_DATE, "date", FALSE },
182 { SCE_B_STRINGEOL, "stringeol", FALSE },
183 { SCE_B_KEYWORD2, "word2", FALSE },
184 { SCE_B_KEYWORD3, "word3", FALSE },
185 { SCE_B_KEYWORD4, "word4", FALSE },
186 { SCE_B_CONSTANT, "constant", FALSE },
187 { SCE_B_ASM, "asm", FALSE },
188 { SCE_B_LABEL, "label", FALSE },
189 { SCE_B_ERROR, "error", FALSE },
190 { SCE_B_HEXNUMBER, "hexnumber", FALSE },
191 { SCE_B_BINNUMBER, "binnumber", FALSE }
193 static const HLKeyword highlighting_keywords_BASIC[] =
195 { 0, "keywords", FALSE },
196 { 1, "preprocessor", FALSE },
197 { 2, "user1", FALSE },
198 { 3, "user2", FALSE }
200 #define highlighting_properties_BASIC EMPTY_PROPERTIES
203 /* BATCH */
204 #define highlighting_lexer_BATCH SCLEX_BATCH
205 static const HLStyle highlighting_styles_BATCH[] =
207 { SCE_BAT_DEFAULT, "default", FALSE },
208 { SCE_BAT_COMMENT, "comment", FALSE },
209 { SCE_BAT_LABEL, "label", FALSE },
210 { SCE_BAT_WORD, "word", FALSE },
211 { SCE_BAT_HIDE, "hide", FALSE },
212 { SCE_BAT_COMMAND, "command", FALSE },
213 { SCE_BAT_IDENTIFIER, "identifier", FALSE },
214 { SCE_BAT_OPERATOR, "operator", FALSE }
216 static const HLKeyword highlighting_keywords_BATCH[] =
218 { 0, "keywords", FALSE },
219 { 1, "keywords_optional", FALSE }
221 #define highlighting_properties_BATCH EMPTY_PROPERTIES
224 /* C */
225 /* Also used by some other SCLEX_CPP-based filetypes */
226 #define highlighting_lexer_C SCLEX_CPP
227 static const HLStyle highlighting_styles_C[] =
229 { SCE_C_DEFAULT, "default", FALSE },
230 { SCE_C_COMMENT, "comment", FALSE },
231 { SCE_C_COMMENTLINE, "commentline", FALSE },
232 { SCE_C_COMMENTDOC, "commentdoc", FALSE },
233 { SCE_C_PREPROCESSORCOMMENT, "preprocessorcomment", FALSE },
234 { SCE_C_PREPROCESSORCOMMENTDOC, "preprocessorcommentdoc", FALSE },
235 { SCE_C_NUMBER, "number", FALSE },
236 { SCE_C_WORD, "word", FALSE },
237 { SCE_C_WORD2, "word2", FALSE },
238 { SCE_C_STRING, "string", FALSE },
239 { SCE_C_STRINGRAW, "stringraw", FALSE },
240 { SCE_C_CHARACTER, "character", FALSE },
241 { SCE_C_USERLITERAL, "userliteral", FALSE },
242 { SCE_C_UUID, "uuid", FALSE },
243 { SCE_C_PREPROCESSOR, "preprocessor", FALSE },
244 { SCE_C_OPERATOR, "operator", FALSE },
245 { SCE_C_IDENTIFIER, "identifier", FALSE },
246 { SCE_C_STRINGEOL, "stringeol", FALSE },
247 { SCE_C_VERBATIM, "verbatim", FALSE },
248 /* triple verbatims use the same style */
249 { SCE_C_TRIPLEVERBATIM, "verbatim", FALSE },
250 { SCE_C_REGEX, "regex", FALSE },
251 { SCE_C_HASHQUOTEDSTRING, "hashquotedstring", FALSE },
252 { SCE_C_COMMENTLINEDOC, "commentlinedoc", FALSE },
253 { SCE_C_COMMENTDOCKEYWORD, "commentdockeyword", FALSE },
254 { SCE_C_COMMENTDOCKEYWORDERROR, "commentdockeyworderror", FALSE },
255 /* used for local structs and typedefs */
256 { SCE_C_GLOBALCLASS, "globalclass", FALSE },
257 { SCE_C_TASKMARKER, "taskmarker", FALSE },
258 { SCE_C_ESCAPESEQUENCE, "escapesequence", FALSE }
260 static const HLKeyword highlighting_keywords_C[] =
262 { 0, "primary", FALSE },
263 /* SCI_SETKEYWORDS = 1 - secondary + global tags file types, see below */
264 { 1, "secondary", TRUE },
265 { 2, "docComment", FALSE }
266 /* SCI_SETKEYWORDS = 3 is for current session types - see editor_lexer_get_type_keyword_idx() */
268 static const HLProperty highlighting_properties_C[] =
270 { "fold.cpp.comment.explicit", "0" }
274 /* Caml */
275 #define highlighting_lexer_CAML SCLEX_CAML
276 static const HLStyle highlighting_styles_CAML[] =
278 { SCE_CAML_DEFAULT, "default", FALSE },
279 { SCE_CAML_COMMENT, "comment", FALSE },
280 { SCE_CAML_COMMENT1, "comment1", FALSE },
281 { SCE_CAML_COMMENT2, "comment2", FALSE },
282 { SCE_CAML_COMMENT3, "comment3", FALSE },
283 { SCE_CAML_NUMBER, "number", FALSE },
284 { SCE_CAML_KEYWORD, "keyword", FALSE },
285 { SCE_CAML_KEYWORD2, "keyword2", FALSE },
286 { SCE_CAML_KEYWORD3, "keyword3", FALSE },
287 { SCE_CAML_STRING, "string", FALSE },
288 { SCE_CAML_CHAR, "char", FALSE },
289 { SCE_CAML_OPERATOR, "operator", FALSE },
290 { SCE_CAML_IDENTIFIER, "identifier", FALSE },
291 { SCE_CAML_TAGNAME, "tagname", FALSE },
292 { SCE_CAML_LINENUM, "linenum", FALSE },
293 { SCE_CAML_WHITE, "white", FALSE }
295 static const HLKeyword highlighting_keywords_CAML[] =
297 { 0, "keywords", FALSE },
298 { 1, "keywords_optional", FALSE }
300 #define highlighting_properties_CAML EMPTY_PROPERTIES
303 /* CMake */
304 #define highlighting_lexer_CMAKE SCLEX_CMAKE
305 static const HLStyle highlighting_styles_CMAKE[] =
307 { SCE_CMAKE_DEFAULT, "default", FALSE },
308 { SCE_CMAKE_COMMENT, "comment", FALSE },
309 { SCE_CMAKE_STRINGDQ, "stringdq", FALSE },
310 { SCE_CMAKE_STRINGLQ, "stringlq", FALSE },
311 { SCE_CMAKE_STRINGRQ, "stringrq", FALSE },
312 { SCE_CMAKE_COMMANDS, "command", FALSE },
313 { SCE_CMAKE_PARAMETERS, "parameters", FALSE },
314 { SCE_CMAKE_VARIABLE, "variable", FALSE },
315 { SCE_CMAKE_USERDEFINED, "userdefined", FALSE },
316 { SCE_CMAKE_WHILEDEF, "whiledef", FALSE },
317 { SCE_CMAKE_FOREACHDEF, "foreachdef", FALSE },
318 { SCE_CMAKE_IFDEFINEDEF, "ifdefinedef", FALSE },
319 { SCE_CMAKE_MACRODEF, "macrodef", FALSE },
320 { SCE_CMAKE_STRINGVAR, "stringvar", FALSE },
321 { SCE_CMAKE_NUMBER, "number", FALSE }
323 static const HLKeyword highlighting_keywords_CMAKE[] =
325 { 0, "commands", FALSE },
326 { 1, "parameters", FALSE },
327 { 2, "userdefined", FALSE }
329 #define highlighting_properties_CMAKE EMPTY_PROPERTIES
332 /* CSS */
333 #define highlighting_lexer_CSS SCLEX_CSS
334 static const HLStyle highlighting_styles_CSS[] =
336 { SCE_CSS_DEFAULT, "default", FALSE },
337 { SCE_CSS_COMMENT, "comment", FALSE },
338 { SCE_CSS_TAG, "tag", FALSE },
339 { SCE_CSS_CLASS, "class", FALSE },
340 { SCE_CSS_PSEUDOCLASS, "pseudoclass", FALSE },
341 { SCE_CSS_UNKNOWN_PSEUDOCLASS, "unknown_pseudoclass", FALSE },
342 { SCE_CSS_UNKNOWN_IDENTIFIER, "unknown_identifier", FALSE },
343 { SCE_CSS_OPERATOR, "operator", FALSE },
344 { SCE_CSS_IDENTIFIER, "identifier", FALSE },
345 { SCE_CSS_DOUBLESTRING, "doublestring", FALSE },
346 { SCE_CSS_SINGLESTRING, "singlestring", FALSE },
347 { SCE_CSS_ATTRIBUTE, "attribute", FALSE },
348 { SCE_CSS_VALUE, "value", FALSE },
349 { SCE_CSS_ID, "id", FALSE },
350 { SCE_CSS_IDENTIFIER2, "identifier2", FALSE },
351 { SCE_CSS_VARIABLE, "variable", FALSE },
352 { SCE_CSS_IMPORTANT, "important", FALSE },
353 { SCE_CSS_DIRECTIVE, "directive", FALSE },
354 { SCE_CSS_IDENTIFIER3, "identifier3", FALSE },
355 { SCE_CSS_PSEUDOELEMENT, "pseudoelement", FALSE },
356 { SCE_CSS_EXTENDED_IDENTIFIER, "extended_identifier", FALSE },
357 { SCE_CSS_EXTENDED_PSEUDOCLASS, "extended_pseudoclass", FALSE },
358 { SCE_CSS_EXTENDED_PSEUDOELEMENT, "extended_pseudoelement", FALSE },
359 { SCE_CSS_MEDIA, "media", FALSE }
361 static const HLKeyword highlighting_keywords_CSS[] =
363 { 0, "primary", FALSE },
364 { 1, "pseudoclasses", FALSE },
365 { 2, "secondary", FALSE },
366 { 3, "css3_properties", FALSE },
367 { 4, "pseudo_elements", FALSE },
368 { 5, "browser_css_properties", FALSE },
369 { 6, "browser_pseudo_classes", FALSE },
370 { 7, "browser_pseudo_elements", FALSE }
372 #define highlighting_properties_CSS EMPTY_PROPERTIES
375 /* Cobol */
376 #define highlighting_lexer_COBOL SCLEX_COBOL
377 #define highlighting_styles_COBOL highlighting_styles_C
378 static const HLKeyword highlighting_keywords_COBOL[] =
380 { 0, "primary", FALSE },
381 { 1, "secondary", FALSE },
382 { 2, "extended_keywords", FALSE }
384 #define highlighting_properties_COBOL highlighting_properties_C
387 /* Conf */
388 #define highlighting_lexer_CONF SCLEX_PROPERTIES
389 static const HLStyle highlighting_styles_CONF[] =
391 { SCE_PROPS_DEFAULT, "default", FALSE },
392 { SCE_PROPS_COMMENT, "comment", FALSE },
393 { SCE_PROPS_SECTION, "section", FALSE },
394 { SCE_PROPS_KEY, "key", FALSE },
395 { SCE_PROPS_ASSIGNMENT, "assignment", FALSE },
396 { SCE_PROPS_DEFVAL, "defval", FALSE }
398 #define highlighting_keywords_CONF EMPTY_KEYWORDS
399 #define highlighting_properties_CONF EMPTY_PROPERTIES
402 /* D */
403 #define highlighting_lexer_D SCLEX_D
404 static const HLStyle highlighting_styles_D[] =
406 { SCE_D_DEFAULT, "default", FALSE },
407 { SCE_D_COMMENT, "comment", FALSE },
408 { SCE_D_COMMENTLINE, "commentline", FALSE },
409 { SCE_D_COMMENTDOC, "commentdoc", FALSE },
410 { SCE_D_COMMENTNESTED, "commentnested", FALSE },
411 { SCE_D_NUMBER, "number", FALSE },
412 { SCE_D_WORD, "word", FALSE },
413 { SCE_D_WORD2, "word2", FALSE },
414 { SCE_D_WORD3, "word3", FALSE },
415 { SCE_D_TYPEDEF, "typedef", FALSE }, /* FIXME: don't remap here */
416 { SCE_D_WORD5, "typedef", FALSE },
417 { SCE_D_STRING, "string", FALSE },
418 { SCE_D_STRINGB, "string", FALSE },
419 { SCE_D_STRINGR, "string", FALSE },
420 { SCE_D_STRINGEOL, "stringeol", FALSE },
421 { SCE_D_CHARACTER, "character", FALSE },
422 { SCE_D_OPERATOR, "operator", FALSE },
423 { SCE_D_IDENTIFIER, "identifier", FALSE },
424 { SCE_D_COMMENTLINEDOC, "commentlinedoc", FALSE },
425 { SCE_D_COMMENTDOCKEYWORD, "commentdockeyword", FALSE },
426 { SCE_D_COMMENTDOCKEYWORDERROR, "commentdockeyworderror", FALSE }
427 /* these are for user-defined keywords we don't set yet */
428 /*{ SCE_D_WORD6, "word6", FALSE },
429 { SCE_D_WORD7, "word7", FALSE }*/
431 static const HLKeyword highlighting_keywords_D[] =
433 { 0, "primary", FALSE },
434 /* SCI_SETKEYWORDS = 1 - secondary + global tags file types */
435 { 1, "secondary", TRUE },
436 { 2, "docComment", FALSE },
437 /* SCI_SETKEYWORDS = 3 is for current session types - see editor_lexer_get_type_keyword_idx() */
438 { 4, "types", FALSE },
440 #define highlighting_properties_D EMPTY_PROPERTIES
443 /* Diff */
444 #define highlighting_lexer_DIFF SCLEX_DIFF
445 static const HLStyle highlighting_styles_DIFF[] =
447 { SCE_DIFF_DEFAULT, "default", FALSE },
448 { SCE_DIFF_COMMENT, "comment", FALSE },
449 { SCE_DIFF_COMMAND, "command", FALSE },
450 { SCE_DIFF_HEADER, "header", FALSE },
451 { SCE_DIFF_POSITION, "position", FALSE },
452 { SCE_DIFF_DELETED, "deleted", FALSE },
453 { SCE_DIFF_ADDED, "added", FALSE },
454 { SCE_DIFF_CHANGED, "changed", FALSE }
456 #define highlighting_keywords_DIFF EMPTY_KEYWORDS
457 #define highlighting_properties_DIFF EMPTY_PROPERTIES
460 #define highlighting_lexer_DOCBOOK SCLEX_XML
461 static const HLStyle highlighting_styles_DOCBOOK[] =
463 { SCE_H_DEFAULT, "default", FALSE },
464 { SCE_H_TAG, "tag", FALSE },
465 { SCE_H_TAGUNKNOWN, "tagunknown", FALSE },
466 { SCE_H_ATTRIBUTE, "attribute", FALSE },
467 { SCE_H_ATTRIBUTEUNKNOWN, "attributeunknown", FALSE },
468 { SCE_H_NUMBER, "number", FALSE },
469 { SCE_H_DOUBLESTRING, "doublestring", FALSE },
470 { SCE_H_SINGLESTRING, "singlestring", FALSE },
471 { SCE_H_OTHER, "other", FALSE },
472 { SCE_H_COMMENT, "comment", FALSE },
473 { SCE_H_ENTITY, "entity", FALSE },
474 { SCE_H_TAGEND, "tagend", FALSE },
475 { SCE_H_XMLSTART, "xmlstart", TRUE },
476 { SCE_H_XMLEND, "xmlend", FALSE },
477 { SCE_H_CDATA, "cdata", FALSE },
478 { SCE_H_QUESTION, "question", FALSE },
479 { SCE_H_VALUE, "value", FALSE },
480 { SCE_H_XCCOMMENT, "xccomment", FALSE },
481 { SCE_H_SGML_DEFAULT, "sgml_default", FALSE },
482 { SCE_H_SGML_COMMENT, "sgml_comment", FALSE },
483 { SCE_H_SGML_SPECIAL, "sgml_special", FALSE },
484 { SCE_H_SGML_COMMAND, "sgml_command", FALSE },
485 { SCE_H_SGML_DOUBLESTRING, "sgml_doublestring", FALSE },
486 { SCE_H_SGML_SIMPLESTRING, "sgml_simplestring", FALSE },
487 { SCE_H_SGML_1ST_PARAM, "sgml_1st_param", FALSE },
488 { SCE_H_SGML_ENTITY, "sgml_entity", FALSE },
489 { SCE_H_SGML_BLOCK_DEFAULT, "sgml_block_default", FALSE },
490 { SCE_H_SGML_1ST_PARAM_COMMENT, "sgml_1st_param_comment", FALSE },
491 { SCE_H_SGML_ERROR, "sgml_error", FALSE }
493 static const HLKeyword highlighting_keywords_DOCBOOK[] =
495 { 0, "elements", FALSE },
496 { 5, "dtd", FALSE }
498 #define highlighting_properties_DOCBOOK EMPTY_PROPERTIES
501 /* Erlang */
502 #define highlighting_lexer_ERLANG SCLEX_ERLANG
503 static const HLStyle highlighting_styles_ERLANG[] =
505 { SCE_ERLANG_DEFAULT, "default", FALSE },
506 { SCE_ERLANG_COMMENT, "comment", FALSE },
507 { SCE_ERLANG_VARIABLE, "variable", FALSE },
508 { SCE_ERLANG_NUMBER, "number", FALSE },
509 { SCE_ERLANG_KEYWORD, "keyword", FALSE },
510 { SCE_ERLANG_STRING, "string", FALSE },
511 { SCE_ERLANG_OPERATOR, "operator", FALSE },
512 { SCE_ERLANG_ATOM, "atom", FALSE },
513 { SCE_ERLANG_FUNCTION_NAME, "function_name", FALSE },
514 { SCE_ERLANG_CHARACTER, "character", FALSE },
515 { SCE_ERLANG_MACRO, "macro", FALSE },
516 { SCE_ERLANG_RECORD, "record", FALSE },
517 { SCE_ERLANG_PREPROC, "preproc", FALSE },
518 { SCE_ERLANG_NODE_NAME, "node_name", FALSE },
519 { SCE_ERLANG_COMMENT_FUNCTION, "comment_function", FALSE },
520 { SCE_ERLANG_COMMENT_MODULE, "comment_module", FALSE },
521 { SCE_ERLANG_COMMENT_DOC, "comment_doc", FALSE },
522 { SCE_ERLANG_COMMENT_DOC_MACRO, "comment_doc_macro", FALSE },
523 { SCE_ERLANG_ATOM_QUOTED, "atom_quoted", FALSE },
524 { SCE_ERLANG_MACRO_QUOTED, "macro_quoted", FALSE },
525 { SCE_ERLANG_RECORD_QUOTED, "record_quoted", FALSE },
526 { SCE_ERLANG_NODE_NAME_QUOTED, "node_name_quoted", FALSE },
527 { SCE_ERLANG_BIFS, "bifs", FALSE },
528 { SCE_ERLANG_MODULES, "modules", FALSE },
529 { SCE_ERLANG_MODULES_ATT, "modules_att", FALSE },
530 { SCE_ERLANG_UNKNOWN, "unknown", FALSE }
532 static const HLKeyword highlighting_keywords_ERLANG[] =
534 { 0, "keywords", FALSE },
535 { 1, "bifs", FALSE },
536 { 2, "preproc", FALSE },
537 { 3, "module", FALSE },
538 { 4, "doc", FALSE },
539 { 5, "doc_macro", FALSE }
541 #define highlighting_properties_ERLANG EMPTY_PROPERTIES
544 /* F77 */
545 #define highlighting_lexer_F77 SCLEX_F77
546 static const HLStyle highlighting_styles_F77[] =
548 { SCE_F_DEFAULT, "default", FALSE },
549 { SCE_F_COMMENT, "comment", FALSE },
550 { SCE_F_NUMBER, "number", FALSE },
551 { SCE_F_STRING1, "string", FALSE },
552 { SCE_F_OPERATOR, "operator", FALSE },
553 { SCE_F_IDENTIFIER, "identifier", FALSE },
554 { SCE_F_STRING2, "string2", FALSE },
555 { SCE_F_WORD, "word", FALSE },
556 { SCE_F_WORD2, "word2", FALSE },
557 { SCE_F_WORD3, "word3", FALSE },
558 { SCE_F_PREPROCESSOR, "preprocessor", FALSE },
559 { SCE_F_OPERATOR2, "operator2", FALSE },
560 { SCE_F_CONTINUATION, "continuation", FALSE },
561 { SCE_F_STRINGEOL, "stringeol", FALSE },
562 { SCE_F_LABEL, "label", FALSE }
564 static const HLKeyword highlighting_keywords_F77[] =
566 { 0, "primary", FALSE },
567 { 1, "intrinsic_functions", FALSE },
568 { 2, "user_functions", FALSE }
570 #define highlighting_properties_F77 EMPTY_PROPERTIES
573 /* Ferite */
574 #define highlighting_lexer_FERITE SCLEX_CPP
575 #define highlighting_styles_FERITE highlighting_styles_C
576 static const HLKeyword highlighting_keywords_FERITE[] =
578 { 0, "primary", FALSE },
579 { 1, "types", FALSE },
580 { 2, "docComment", FALSE }
582 #define highlighting_properties_FERITE highlighting_properties_C
585 /* Forth */
586 #define highlighting_lexer_FORTH SCLEX_FORTH
587 static const HLStyle highlighting_styles_FORTH[] =
589 { SCE_FORTH_DEFAULT, "default", FALSE },
590 { SCE_FORTH_COMMENT, "comment", FALSE },
591 { SCE_FORTH_COMMENT_ML, "commentml", FALSE },
592 { SCE_FORTH_IDENTIFIER, "identifier", FALSE },
593 { SCE_FORTH_CONTROL, "control", FALSE },
594 { SCE_FORTH_KEYWORD, "keyword", FALSE },
595 { SCE_FORTH_DEFWORD, "defword", FALSE },
596 { SCE_FORTH_PREWORD1, "preword1", FALSE },
597 { SCE_FORTH_PREWORD2, "preword2", FALSE },
598 { SCE_FORTH_NUMBER, "number", FALSE },
599 { SCE_FORTH_STRING, "string", FALSE },
600 { SCE_FORTH_LOCALE, "locale", FALSE }
602 static const HLKeyword highlighting_keywords_FORTH[] =
604 { 0, "primary", FALSE },
605 { 1, "keyword", FALSE },
606 { 2, "defword", FALSE },
607 { 3, "preword1", FALSE },
608 { 4, "preword2", FALSE },
609 { 5, "string", FALSE }
611 #define highlighting_properties_FORTH EMPTY_PROPERTIES
614 /* Fortran */
615 /* F77 and Fortran (F9x) uses different lexers but shares styles and keywords */
616 #define highlighting_lexer_FORTRAN SCLEX_FORTRAN
617 #define highlighting_styles_FORTRAN highlighting_styles_F77
618 #define highlighting_keywords_FORTRAN highlighting_keywords_F77
619 #define highlighting_properties_FORTRAN highlighting_properties_F77
622 /* Haskell */
623 #define highlighting_lexer_HASKELL SCLEX_HASKELL
624 static const HLStyle highlighting_styles_HASKELL[] =
626 { SCE_HA_DEFAULT, "default", FALSE },
627 { SCE_HA_COMMENTLINE, "commentline", FALSE },
628 { SCE_HA_COMMENTBLOCK, "commentblock", FALSE },
629 { SCE_HA_COMMENTBLOCK2, "commentblock2", FALSE },
630 { SCE_HA_COMMENTBLOCK3, "commentblock3", FALSE },
631 { SCE_HA_NUMBER, "number", FALSE },
632 { SCE_HA_KEYWORD, "keyword", FALSE },
633 { SCE_HA_IMPORT, "import", FALSE },
634 { SCE_HA_STRING, "string", FALSE },
635 { SCE_HA_CHARACTER, "character", FALSE },
636 { SCE_HA_CLASS, "class", FALSE },
637 { SCE_HA_OPERATOR, "operator", FALSE },
638 { SCE_HA_IDENTIFIER, "identifier", FALSE },
639 { SCE_HA_INSTANCE, "instance", FALSE },
640 { SCE_HA_CAPITAL, "capital", FALSE },
641 { SCE_HA_MODULE, "module", FALSE },
642 { SCE_HA_DATA, "data", FALSE },
643 { SCE_HA_PRAGMA, "pragma", FALSE },
644 { SCE_HA_PREPROCESSOR, "preprocessor", FALSE },
645 { SCE_HA_STRINGEOL, "stringeol", FALSE },
646 { SCE_HA_RESERVED_OPERATOR, "reserved_operator", FALSE },
647 { SCE_HA_LITERATE_COMMENT, "literate_comment", FALSE },
648 { SCE_HA_LITERATE_CODEDELIM, "literate_codedelim", FALSE }
650 static const HLKeyword highlighting_keywords_HASKELL[] =
652 { 0, "keywords", FALSE },
653 { 1, "ffi", FALSE },
654 { 2, "reserved_operators", FALSE }
656 #define highlighting_properties_HASKELL EMPTY_PROPERTIES
659 /* HAXE */
660 #define highlighting_lexer_HAXE SCLEX_CPP
661 #define highlighting_styles_HAXE highlighting_styles_C
662 static const HLKeyword highlighting_keywords_HAXE[] =
664 { 0, "primary", FALSE },
665 { 1, "secondary", FALSE },
666 { 3, "classes", FALSE }
668 #define highlighting_properties_HAXE highlighting_properties_C
671 /* HTML */
672 #define highlighting_lexer_HTML SCLEX_HTML
673 static const HLStyle highlighting_styles_HTML[] =
675 { SCE_H_DEFAULT, "html_default", FALSE },
676 { SCE_H_TAG, "html_tag", FALSE },
677 { SCE_H_TAGUNKNOWN, "html_tagunknown", FALSE },
678 { SCE_H_ATTRIBUTE, "html_attribute", FALSE },
679 { SCE_H_ATTRIBUTEUNKNOWN, "html_attributeunknown", FALSE },
680 { SCE_H_NUMBER, "html_number", FALSE },
681 { SCE_H_DOUBLESTRING, "html_doublestring", FALSE },
682 { SCE_H_SINGLESTRING, "html_singlestring", FALSE },
683 { SCE_H_OTHER, "html_other", FALSE },
684 { SCE_H_COMMENT, "html_comment", FALSE },
685 { SCE_H_ENTITY, "html_entity", FALSE },
686 { SCE_H_TAGEND, "html_tagend", FALSE },
687 { SCE_H_XMLSTART, "html_xmlstart", TRUE },
688 { SCE_H_XMLEND, "html_xmlend", FALSE },
689 { SCE_H_SCRIPT, "html_script", FALSE },
690 { SCE_H_ASP, "html_asp", TRUE },
691 { SCE_H_ASPAT, "html_aspat", TRUE },
692 { SCE_H_CDATA, "html_cdata", FALSE },
693 { SCE_H_QUESTION, "html_question", FALSE },
694 { SCE_H_VALUE, "html_value", FALSE },
695 { SCE_H_XCCOMMENT, "html_xccomment", FALSE },
697 { SCE_H_SGML_DEFAULT, "sgml_default", FALSE },
698 { SCE_H_SGML_COMMENT, "sgml_comment", FALSE },
699 { SCE_H_SGML_SPECIAL, "sgml_special", FALSE },
700 { SCE_H_SGML_COMMAND, "sgml_command", FALSE },
701 { SCE_H_SGML_DOUBLESTRING, "sgml_doublestring", FALSE },
702 { SCE_H_SGML_SIMPLESTRING, "sgml_simplestring", FALSE },
703 { SCE_H_SGML_1ST_PARAM, "sgml_1st_param", FALSE },
704 { SCE_H_SGML_ENTITY, "sgml_entity", FALSE },
705 { SCE_H_SGML_BLOCK_DEFAULT, "sgml_block_default", FALSE },
706 { SCE_H_SGML_1ST_PARAM_COMMENT, "sgml_1st_param_comment", FALSE },
707 { SCE_H_SGML_ERROR, "sgml_error", FALSE },
709 /* embedded JavaScript */
710 { SCE_HJ_START, "jscript_start", FALSE },
711 { SCE_HJ_DEFAULT, "jscript_default", FALSE },
712 { SCE_HJ_COMMENT, "jscript_comment", FALSE },
713 { SCE_HJ_COMMENTLINE, "jscript_commentline", FALSE },
714 { SCE_HJ_COMMENTDOC, "jscript_commentdoc", FALSE },
715 { SCE_HJ_NUMBER, "jscript_number", FALSE },
716 { SCE_HJ_WORD, "jscript_word", FALSE },
717 { SCE_HJ_KEYWORD, "jscript_keyword", FALSE },
718 { SCE_HJ_DOUBLESTRING, "jscript_doublestring", FALSE },
719 { SCE_HJ_SINGLESTRING, "jscript_singlestring", FALSE },
720 { SCE_HJ_SYMBOLS, "jscript_symbols", FALSE },
721 { SCE_HJ_STRINGEOL, "jscript_stringeol", FALSE },
722 { SCE_HJ_REGEX, "jscript_regex", FALSE },
724 /* for HB, VBScript?, use the same styles as for JavaScript */
725 { SCE_HB_START, "jscript_start", FALSE },
726 { SCE_HB_DEFAULT, "jscript_default", FALSE },
727 { SCE_HB_COMMENTLINE, "jscript_commentline", FALSE },
728 { SCE_HB_NUMBER, "jscript_number", FALSE },
729 { SCE_HB_WORD, "jscript_keyword", FALSE }, /* keywords */
730 { SCE_HB_STRING, "jscript_doublestring", FALSE },
731 { SCE_HB_IDENTIFIER, "jscript_symbols", FALSE },
732 { SCE_HB_STRINGEOL, "jscript_stringeol", FALSE },
734 /* for HBA, VBScript?, use the same styles as for JavaScript */
735 { SCE_HBA_START, "jscript_start", FALSE },
736 { SCE_HBA_DEFAULT, "jscript_default", FALSE },
737 { SCE_HBA_COMMENTLINE, "jscript_commentline", FALSE },
738 { SCE_HBA_NUMBER, "jscript_number", FALSE },
739 { SCE_HBA_WORD, "jscript_keyword", FALSE }, /* keywords */
740 { SCE_HBA_STRING, "jscript_doublestring", FALSE },
741 { SCE_HBA_IDENTIFIER, "jscript_symbols", FALSE },
742 { SCE_HBA_STRINGEOL, "jscript_stringeol", FALSE },
744 /* for HJA, ASP Javascript, use the same styles as for JavaScript */
745 { SCE_HJA_START, "jscript_start", FALSE },
746 { SCE_HJA_DEFAULT, "jscript_default", FALSE },
747 { SCE_HJA_COMMENT, "jscript_comment", FALSE },
748 { SCE_HJA_COMMENTLINE, "jscript_commentline", FALSE },
749 { SCE_HJA_COMMENTDOC, "jscript_commentdoc", FALSE },
750 { SCE_HJA_NUMBER, "jscript_number", FALSE },
751 { SCE_HJA_WORD, "jscript_word", FALSE },
752 { SCE_HJA_KEYWORD, "jscript_keyword", FALSE },
753 { SCE_HJA_DOUBLESTRING, "jscript_doublestring", FALSE },
754 { SCE_HJA_SINGLESTRING, "jscript_singlestring", FALSE },
755 { SCE_HJA_SYMBOLS, "jscript_symbols", FALSE },
756 { SCE_HJA_STRINGEOL, "jscript_stringeol", FALSE },
757 { SCE_HJA_REGEX, "jscript_regex", FALSE },
759 /* embedded Python */
760 { SCE_HP_START, "jscript_start", FALSE },
761 { SCE_HP_DEFAULT, "python_default", FALSE },
762 { SCE_HP_COMMENTLINE, "python_commentline", FALSE },
763 { SCE_HP_NUMBER, "python_number", FALSE },
764 { SCE_HP_STRING, "python_string", FALSE },
765 { SCE_HP_CHARACTER, "python_character", FALSE },
766 { SCE_HP_WORD, "python_word", FALSE },
767 { SCE_HP_TRIPLE, "python_triple", FALSE },
768 { SCE_HP_TRIPLEDOUBLE, "python_tripledouble", FALSE },
769 { SCE_HP_CLASSNAME, "python_classname", FALSE },
770 { SCE_HP_DEFNAME, "python_defname", FALSE },
771 { SCE_HP_OPERATOR, "python_operator", FALSE },
772 { SCE_HP_IDENTIFIER, "python_identifier", FALSE },
774 /* for embedded HPA (what is this?) we use the Python styles */
775 { SCE_HPA_START, "jscript_start", FALSE },
776 { SCE_HPA_DEFAULT, "python_default", FALSE },
777 { SCE_HPA_COMMENTLINE, "python_commentline", FALSE },
778 { SCE_HPA_NUMBER, "python_number", FALSE },
779 { SCE_HPA_STRING, "python_string", FALSE },
780 { SCE_HPA_CHARACTER, "python_character", FALSE },
781 { SCE_HPA_WORD, "python_word", FALSE },
782 { SCE_HPA_TRIPLE, "python_triple", FALSE },
783 { SCE_HPA_TRIPLEDOUBLE, "python_tripledouble", FALSE },
784 { SCE_HPA_CLASSNAME, "python_classname", FALSE },
785 { SCE_HPA_DEFNAME, "python_defname", FALSE },
786 { SCE_HPA_OPERATOR, "python_operator", FALSE },
787 { SCE_HPA_IDENTIFIER, "python_identifier", FALSE },
789 /* PHP */
790 { SCE_HPHP_DEFAULT, "php_default", FALSE },
791 { SCE_HPHP_SIMPLESTRING, "php_simplestring", FALSE },
792 { SCE_HPHP_HSTRING, "php_hstring", FALSE },
793 { SCE_HPHP_NUMBER, "php_number", FALSE },
794 { SCE_HPHP_WORD, "php_word", FALSE },
795 { SCE_HPHP_VARIABLE, "php_variable", FALSE },
796 { SCE_HPHP_COMMENT, "php_comment", FALSE },
797 { SCE_HPHP_COMMENTLINE, "php_commentline", FALSE },
798 { SCE_HPHP_OPERATOR, "php_operator", FALSE },
799 { SCE_HPHP_HSTRING_VARIABLE, "php_hstring_variable", FALSE },
800 { SCE_HPHP_COMPLEX_VARIABLE, "php_complex_variable", FALSE }
802 static const HLKeyword highlighting_keywords_HTML[] =
804 { 0, "html", FALSE },
805 { 1, "javascript", FALSE },
806 { 2, "vbscript", FALSE },
807 { 3, "python", FALSE },
808 { 4, "php", FALSE },
809 { 5, "sgml", FALSE }
811 static const HLProperty highlighting_properties_HTML[] =
813 { "fold.html", "1" },
814 { "fold.html.preprocessor", "0" }
818 /* Java */
819 #define highlighting_lexer_JAVA SCLEX_CPP
820 #define highlighting_styles_JAVA highlighting_styles_C
821 static const HLKeyword highlighting_keywords_JAVA[] =
823 { 0, "primary", FALSE },
824 /* SCI_SETKEYWORDS = 1 - secondary + global tags file types, see below */
825 { 1, "secondary", TRUE },
826 { 2, "doccomment", FALSE },
827 /* SCI_SETKEYWORDS = 3 is for current session types - see editor_lexer_get_type_keyword_idx() */
828 { 4, "typedefs", FALSE }
830 #define highlighting_properties_JAVA highlighting_properties_C
833 /* JavaScript */
834 #define highlighting_lexer_JS SCLEX_CPP
835 #define highlighting_styles_JS highlighting_styles_C
836 static const HLKeyword highlighting_keywords_JS[] =
838 { 0, "primary", FALSE },
839 { 1, "secondary", FALSE }
841 #define highlighting_properties_JS highlighting_properties_C
844 /* LaTeX */
845 #define highlighting_lexer_LATEX SCLEX_LATEX
846 static const HLStyle highlighting_styles_LATEX[] =
848 { SCE_L_DEFAULT, "default", FALSE },
849 { SCE_L_COMMAND, "command", FALSE },
850 { SCE_L_TAG, "tag", FALSE },
851 { SCE_L_MATH, "math", FALSE },
852 { SCE_L_COMMENT, "comment", FALSE },
853 { SCE_L_TAG2, "tag2", FALSE },
854 { SCE_L_MATH2, "math2", FALSE },
855 { SCE_L_COMMENT2, "comment2", FALSE },
856 { SCE_L_VERBATIM, "verbatim", FALSE },
857 { SCE_L_SHORTCMD, "shortcmd", FALSE },
858 { SCE_L_SPECIAL, "special", FALSE },
859 { SCE_L_CMDOPT, "cmdopt", FALSE },
860 { SCE_L_ERROR, "error", FALSE }
862 static const HLKeyword highlighting_keywords_LATEX[] =
864 { 0, "primary", FALSE }
866 #define highlighting_properties_LATEX EMPTY_PROPERTIES
869 /* Lisp */
870 #define highlighting_lexer_LISP SCLEX_LISP
871 static const HLStyle highlighting_styles_LISP[] =
873 { SCE_LISP_DEFAULT, "default", FALSE },
874 { SCE_LISP_COMMENT, "comment", FALSE },
875 { SCE_LISP_MULTI_COMMENT, "multicomment", FALSE },
876 { SCE_LISP_NUMBER, "number", FALSE },
877 { SCE_LISP_KEYWORD, "keyword", FALSE },
878 { SCE_LISP_SYMBOL, "symbol", FALSE },
879 { SCE_LISP_STRING, "string", FALSE },
880 { SCE_LISP_STRINGEOL, "stringeol", FALSE },
881 { SCE_LISP_IDENTIFIER, "identifier", FALSE },
882 { SCE_LISP_OPERATOR, "operator", FALSE },
883 { SCE_LISP_SPECIAL, "special", FALSE },
884 { SCE_LISP_KEYWORD_KW, "keywordkw", FALSE }
886 static const HLKeyword highlighting_keywords_LISP[] =
888 { 0, "keywords", FALSE },
889 { 1, "special_keywords", FALSE }
891 #define highlighting_properties_LISP EMPTY_PROPERTIES
894 /* Lua */
895 #define highlighting_lexer_LUA SCLEX_LUA
896 static const HLStyle highlighting_styles_LUA[] =
898 { SCE_LUA_DEFAULT, "default", FALSE },
899 { SCE_LUA_COMMENT, "comment", FALSE },
900 { SCE_LUA_COMMENTLINE, "commentline", FALSE },
901 { SCE_LUA_COMMENTDOC, "commentdoc", FALSE },
902 { SCE_LUA_NUMBER, "number", FALSE },
903 { SCE_LUA_WORD, "word", FALSE },
904 { SCE_LUA_STRING, "string", FALSE },
905 { SCE_LUA_CHARACTER, "character", FALSE },
906 { SCE_LUA_LITERALSTRING, "literalstring", FALSE },
907 { SCE_LUA_PREPROCESSOR, "preprocessor", FALSE },
908 { SCE_LUA_OPERATOR, "operator", FALSE },
909 { SCE_LUA_IDENTIFIER, "identifier", FALSE },
910 { SCE_LUA_STRINGEOL, "stringeol", FALSE },
911 { SCE_LUA_WORD2, "function_basic", FALSE },
912 { SCE_LUA_WORD3, "function_other", FALSE },
913 { SCE_LUA_WORD4, "coroutines", FALSE },
914 { SCE_LUA_WORD5, "word5", FALSE },
915 { SCE_LUA_WORD6, "word6", FALSE },
916 { SCE_LUA_WORD7, "word7", FALSE },
917 { SCE_LUA_WORD8, "word8", FALSE },
918 { SCE_LUA_LABEL, "label", FALSE }
920 static const HLKeyword highlighting_keywords_LUA[] =
922 { 0, "keywords", FALSE },
923 { 1, "function_basic", FALSE },
924 { 2, "function_other", FALSE },
925 { 3, "coroutines", FALSE },
926 { 4, "user1", FALSE },
927 { 5, "user2", FALSE },
928 { 6, "user3", FALSE },
929 { 7, "user4", FALSE }
931 #define highlighting_properties_LUA EMPTY_PROPERTIES
934 /* Makefile */
935 #define highlighting_lexer_MAKE SCLEX_MAKEFILE
936 static const HLStyle highlighting_styles_MAKE[] =
938 { SCE_MAKE_DEFAULT, "default", FALSE },
939 { SCE_MAKE_COMMENT, "comment", FALSE },
940 { SCE_MAKE_PREPROCESSOR, "preprocessor", FALSE },
941 { SCE_MAKE_IDENTIFIER, "identifier", FALSE },
942 { SCE_MAKE_OPERATOR, "operator", FALSE },
943 { SCE_MAKE_TARGET, "target", FALSE },
944 { SCE_MAKE_IDEOL, "ideol", FALSE }
946 #define highlighting_keywords_MAKE EMPTY_KEYWORDS
947 #define highlighting_properties_MAKE EMPTY_PROPERTIES
950 /* Markdown */
951 #define highlighting_lexer_MARKDOWN SCLEX_MARKDOWN
952 static const HLStyle highlighting_styles_MARKDOWN[] =
954 { SCE_MARKDOWN_DEFAULT, "default", FALSE },
955 { SCE_MARKDOWN_LINE_BEGIN, "default", FALSE }, /* FIXME: avoid in-code re-mappings */
956 { SCE_MARKDOWN_PRECHAR, "default", FALSE },
957 { SCE_MARKDOWN_STRONG1, "strong", FALSE },
958 { SCE_MARKDOWN_STRONG2, "strong", FALSE },
959 { SCE_MARKDOWN_EM1, "emphasis", FALSE },
960 { SCE_MARKDOWN_EM2, "emphasis", FALSE },
961 { SCE_MARKDOWN_HEADER1, "header1", FALSE },
962 { SCE_MARKDOWN_HEADER2, "header2", FALSE },
963 { SCE_MARKDOWN_HEADER3, "header3", FALSE },
964 { SCE_MARKDOWN_HEADER4, "header4", FALSE },
965 { SCE_MARKDOWN_HEADER5, "header5", FALSE },
966 { SCE_MARKDOWN_HEADER6, "header6", FALSE },
967 { SCE_MARKDOWN_ULIST_ITEM, "ulist_item", FALSE },
968 { SCE_MARKDOWN_OLIST_ITEM, "olist_item", FALSE },
969 { SCE_MARKDOWN_BLOCKQUOTE, "blockquote", FALSE },
970 { SCE_MARKDOWN_STRIKEOUT, "strikeout", FALSE },
971 { SCE_MARKDOWN_HRULE, "hrule", FALSE },
972 { SCE_MARKDOWN_LINK, "link", FALSE },
973 { SCE_MARKDOWN_CODE, "code", FALSE },
974 { SCE_MARKDOWN_CODE2, "code", FALSE },
975 { SCE_MARKDOWN_CODEBK, "codebk", FALSE }
977 #define highlighting_keywords_MARKDOWN EMPTY_KEYWORDS
978 #define highlighting_properties_MARKDOWN EMPTY_PROPERTIES
981 /* Matlab */
982 #define highlighting_lexer_MATLAB SCLEX_OCTAVE /* not MATLAB to support Octave's # comments */
983 static const HLStyle highlighting_styles_MATLAB[] =
985 { SCE_MATLAB_DEFAULT, "default", FALSE },
986 { SCE_MATLAB_COMMENT, "comment", FALSE },
987 { SCE_MATLAB_COMMAND, "command", FALSE },
988 { SCE_MATLAB_NUMBER, "number", FALSE },
989 { SCE_MATLAB_KEYWORD, "keyword", FALSE },
990 { SCE_MATLAB_STRING, "string", FALSE },
991 { SCE_MATLAB_OPERATOR, "operator", FALSE },
992 { SCE_MATLAB_IDENTIFIER, "identifier", FALSE },
993 { SCE_MATLAB_DOUBLEQUOTESTRING, "doublequotedstring", FALSE }
995 static const HLKeyword highlighting_keywords_MATLAB[] =
997 { 0, "primary", FALSE }
999 #define highlighting_properties_MATLAB EMPTY_PROPERTIES
1002 /* NSIS */
1003 #define highlighting_lexer_NSIS SCLEX_NSIS
1004 static const HLStyle highlighting_styles_NSIS[] =
1006 { SCE_NSIS_DEFAULT, "default", FALSE },
1007 { SCE_NSIS_COMMENT, "comment", FALSE },
1008 { SCE_NSIS_STRINGDQ, "stringdq", FALSE },
1009 { SCE_NSIS_STRINGLQ, "stringlq", FALSE },
1010 { SCE_NSIS_STRINGRQ, "stringrq", FALSE },
1011 { SCE_NSIS_FUNCTION, "function", FALSE },
1012 { SCE_NSIS_VARIABLE, "variable", FALSE },
1013 { SCE_NSIS_LABEL, "label", FALSE },
1014 { SCE_NSIS_USERDEFINED, "userdefined", FALSE },
1015 { SCE_NSIS_SECTIONDEF, "sectiondef", FALSE },
1016 { SCE_NSIS_SUBSECTIONDEF, "subsectiondef", FALSE },
1017 { SCE_NSIS_IFDEFINEDEF, "ifdefinedef", FALSE },
1018 { SCE_NSIS_MACRODEF, "macrodef", FALSE },
1019 { SCE_NSIS_STRINGVAR, "stringvar", FALSE },
1020 { SCE_NSIS_NUMBER, "number", FALSE },
1021 { SCE_NSIS_SECTIONGROUP, "sectiongroup", FALSE },
1022 { SCE_NSIS_PAGEEX, "pageex", FALSE },
1023 { SCE_NSIS_FUNCTIONDEF, "functiondef", FALSE },
1024 { SCE_NSIS_COMMENTBOX, "commentbox", FALSE }
1026 static const HLKeyword highlighting_keywords_NSIS[] =
1028 { 0, "functions", FALSE },
1029 { 1, "variables", FALSE },
1030 { 2, "lables", FALSE },
1031 { 3, "userdefined", FALSE }
1033 #define highlighting_properties_NSIS EMPTY_PROPERTIES
1036 /* Objective-C */
1037 #define highlighting_lexer_OBJECTIVEC highlighting_lexer_C
1038 #define highlighting_styles_OBJECTIVEC highlighting_styles_C
1039 static const HLKeyword highlighting_keywords_OBJECTIVEC[] =
1041 { 0, "primary", FALSE },
1042 /* SCI_SETKEYWORDS = 1 - secondary + global tags file types, see below */
1043 { 1, "secondary", TRUE },
1044 { 2, "docComment", FALSE }
1045 /* SCI_SETKEYWORDS = 3 is for current session types - see editor_lexer_get_type_keyword_idx() */
1047 #define highlighting_properties_OBJECTIVEC highlighting_properties_C
1050 /* Pascal */
1051 #define highlighting_lexer_PASCAL SCLEX_PASCAL
1052 static const HLStyle highlighting_styles_PASCAL[] =
1054 { SCE_PAS_DEFAULT, "default", FALSE },
1055 { SCE_PAS_IDENTIFIER, "identifier", FALSE },
1056 { SCE_PAS_COMMENT, "comment", FALSE },
1057 { SCE_PAS_COMMENT2, "comment2", FALSE },
1058 { SCE_PAS_COMMENTLINE, "commentline", FALSE },
1059 { SCE_PAS_PREPROCESSOR, "preprocessor", FALSE },
1060 { SCE_PAS_PREPROCESSOR2, "preprocessor2", FALSE },
1061 { SCE_PAS_NUMBER, "number", FALSE },
1062 { SCE_PAS_HEXNUMBER, "hexnumber", FALSE },
1063 { SCE_PAS_WORD, "word", FALSE },
1064 { SCE_PAS_STRING, "string", FALSE },
1065 { SCE_PAS_STRINGEOL, "stringeol", FALSE },
1066 { SCE_PAS_CHARACTER, "character", FALSE },
1067 { SCE_PAS_OPERATOR, "operator", FALSE },
1068 { SCE_PAS_ASM, "asm", FALSE }
1070 static const HLKeyword highlighting_keywords_PASCAL[] =
1072 { 0, "primary", FALSE }
1074 #define highlighting_properties_PASCAL EMPTY_PROPERTIES
1077 /* Perl */
1078 #define highlighting_lexer_PERL SCLEX_PERL
1079 static const HLStyle highlighting_styles_PERL[] =
1081 { SCE_PL_DEFAULT, "default", FALSE },
1082 { SCE_PL_ERROR, "error", FALSE },
1083 { SCE_PL_COMMENTLINE, "commentline", FALSE },
1084 { SCE_PL_NUMBER, "number", FALSE },
1085 { SCE_PL_WORD, "word", FALSE },
1086 { SCE_PL_STRING, "string", FALSE },
1087 { SCE_PL_CHARACTER, "character", FALSE },
1088 { SCE_PL_PREPROCESSOR, "preprocessor", FALSE },
1089 { SCE_PL_OPERATOR, "operator", FALSE },
1090 { SCE_PL_IDENTIFIER, "identifier", FALSE },
1091 { SCE_PL_SCALAR, "scalar", FALSE },
1092 { SCE_PL_POD, "pod", FALSE },
1093 { SCE_PL_REGEX, "regex", FALSE },
1094 { SCE_PL_ARRAY, "array", FALSE },
1095 { SCE_PL_HASH, "hash", FALSE },
1096 { SCE_PL_SYMBOLTABLE, "symboltable", FALSE },
1097 { SCE_PL_BACKTICKS, "backticks", FALSE },
1098 { SCE_PL_POD_VERB, "pod_verbatim", FALSE },
1099 { SCE_PL_REGSUBST, "reg_subst", FALSE },
1100 { SCE_PL_DATASECTION, "datasection", FALSE },
1101 { SCE_PL_HERE_DELIM, "here_delim", FALSE },
1102 { SCE_PL_HERE_Q, "here_q", FALSE },
1103 { SCE_PL_HERE_QQ, "here_qq", FALSE },
1104 { SCE_PL_HERE_QX, "here_qx", FALSE },
1105 { SCE_PL_STRING_Q, "string_q", FALSE },
1106 { SCE_PL_STRING_QQ, "string_qq", FALSE },
1107 { SCE_PL_STRING_QX, "string_qx", FALSE },
1108 { SCE_PL_STRING_QR, "string_qr", FALSE },
1109 { SCE_PL_STRING_QW, "string_qw", FALSE },
1110 { SCE_PL_VARIABLE_INDEXER, "variable_indexer", FALSE },
1111 { SCE_PL_PUNCTUATION, "punctuation", FALSE },
1112 { SCE_PL_LONGQUOTE, "longquote", FALSE },
1113 { SCE_PL_SUB_PROTOTYPE, "sub_prototype", FALSE },
1114 { SCE_PL_FORMAT_IDENT, "format_ident", FALSE },
1115 { SCE_PL_FORMAT, "format", FALSE },
1116 { SCE_PL_STRING_VAR, "string_var", FALSE },
1117 { SCE_PL_XLAT, "xlat", FALSE },
1118 { SCE_PL_REGEX_VAR, "regex_var", FALSE },
1119 { SCE_PL_REGSUBST_VAR, "regsubst_var", FALSE },
1120 { SCE_PL_BACKTICKS_VAR, "backticks_var", FALSE },
1121 { SCE_PL_HERE_QQ_VAR, "here_qq_var", FALSE },
1122 { SCE_PL_HERE_QX_VAR, "here_qx_var", FALSE },
1123 { SCE_PL_STRING_QQ_VAR, "string_qq_var", FALSE },
1124 { SCE_PL_STRING_QX_VAR, "string_qx_var", FALSE },
1125 { SCE_PL_STRING_QR_VAR, "string_qr_var", FALSE }
1127 static const HLKeyword highlighting_keywords_PERL[] =
1129 { 0, "primary", FALSE }
1131 #define highlighting_properties_PERL EMPTY_PROPERTIES
1134 /* PHP */
1135 #define highlighting_lexer_PHP SCLEX_HTML
1136 #define highlighting_styles_PHP highlighting_styles_HTML
1137 #define highlighting_keywords_PHP highlighting_keywords_HTML
1138 #define highlighting_properties_PHP highlighting_properties_HTML
1141 /* PO (gettext) */
1142 #define highlighting_lexer_PO SCLEX_PO
1143 static const HLStyle highlighting_styles_PO[] =
1145 { SCE_PO_DEFAULT, "default", FALSE },
1146 { SCE_PO_COMMENT, "comment", FALSE },
1147 { SCE_PO_PROGRAMMER_COMMENT, "programmer_comment", FALSE },
1148 { SCE_PO_REFERENCE, "reference", FALSE },
1149 { SCE_PO_FLAGS, "flags", FALSE },
1150 { SCE_PO_FUZZY, "fuzzy", FALSE },
1151 { SCE_PO_MSGID, "msgid", FALSE },
1152 { SCE_PO_MSGID_TEXT, "msgid_text", FALSE },
1153 { SCE_PO_MSGID_TEXT_EOL, "msgid_text_eol", FALSE },
1154 { SCE_PO_MSGSTR, "msgstr", FALSE },
1155 { SCE_PO_MSGSTR_TEXT, "msgstr_text", FALSE },
1156 { SCE_PO_MSGSTR_TEXT_EOL, "msgstr_text_eol", FALSE },
1157 { SCE_PO_MSGCTXT, "msgctxt", FALSE },
1158 { SCE_PO_MSGCTXT_TEXT, "msgctxt_text", FALSE },
1159 { SCE_PO_MSGCTXT_TEXT_EOL, "msgctxt_text_eol", FALSE },
1160 { SCE_PO_ERROR, "error", FALSE }
1162 #define highlighting_keywords_PO EMPTY_KEYWORDS
1163 #define highlighting_properties_PO EMPTY_PROPERTIES
1166 /* PowerShell */
1167 #define highlighting_lexer_POWERSHELL SCLEX_POWERSHELL
1168 static const HLStyle highlighting_styles_POWERSHELL[] =
1170 { SCE_POWERSHELL_DEFAULT, "default", FALSE },
1171 { SCE_POWERSHELL_COMMENT, "comment", FALSE },
1172 { SCE_POWERSHELL_STRING, "string", FALSE },
1173 { SCE_POWERSHELL_CHARACTER, "character", FALSE },
1174 { SCE_POWERSHELL_NUMBER, "number", FALSE },
1175 { SCE_POWERSHELL_VARIABLE, "variable", FALSE },
1176 { SCE_POWERSHELL_OPERATOR, "operator", FALSE },
1177 { SCE_POWERSHELL_IDENTIFIER, "identifier", FALSE },
1178 { SCE_POWERSHELL_KEYWORD, "keyword", FALSE },
1179 { SCE_POWERSHELL_CMDLET, "cmdlet", FALSE },
1180 { SCE_POWERSHELL_ALIAS, "alias", FALSE },
1181 { SCE_POWERSHELL_FUNCTION, "function", FALSE },
1182 { SCE_POWERSHELL_USER1, "user1", FALSE },
1183 { SCE_POWERSHELL_COMMENTSTREAM, "commentstream", FALSE },
1184 { SCE_POWERSHELL_HERE_STRING, "here_string", FALSE },
1185 { SCE_POWERSHELL_HERE_CHARACTER, "here_character", FALSE },
1186 { SCE_POWERSHELL_COMMENTDOCKEYWORD, "commentdockeyword", FALSE },
1188 static const HLKeyword highlighting_keywords_POWERSHELL[] =
1190 { 0, "keywords", FALSE },
1191 { 1, "cmdlets", FALSE },
1192 { 2, "aliases", FALSE },
1193 { 3, "functions", FALSE },
1194 { 4, "user1", FALSE },
1195 { 5, "docComment", FALSE },
1197 #define highlighting_properties_POWERSHELL EMPTY_PROPERTIES
1200 /* Python */
1201 #define highlighting_lexer_PYTHON SCLEX_PYTHON
1202 static const HLStyle highlighting_styles_PYTHON[] =
1204 { SCE_P_DEFAULT, "default", FALSE },
1205 { SCE_P_COMMENTLINE, "commentline", FALSE },
1206 { SCE_P_NUMBER, "number", FALSE },
1207 { SCE_P_STRING, "string", FALSE },
1208 { SCE_P_CHARACTER, "character", FALSE },
1209 { SCE_P_WORD, "word", FALSE },
1210 { SCE_P_TRIPLE, "triple", FALSE },
1211 { SCE_P_TRIPLEDOUBLE, "tripledouble", FALSE },
1212 { SCE_P_CLASSNAME, "classname", FALSE },
1213 { SCE_P_DEFNAME, "defname", FALSE },
1214 { SCE_P_OPERATOR, "operator", FALSE },
1215 { SCE_P_IDENTIFIER, "identifier", FALSE },
1216 { SCE_P_COMMENTBLOCK, "commentblock", FALSE },
1217 { SCE_P_STRINGEOL, "stringeol", FALSE },
1218 { SCE_P_WORD2, "word2", FALSE },
1219 { SCE_P_DECORATOR, "decorator", FALSE }
1221 static const HLKeyword highlighting_keywords_PYTHON[] =
1223 { 0, "primary", FALSE },
1224 { 1, "identifiers", FALSE }
1226 #define highlighting_properties_PYTHON EMPTY_PROPERTIES
1229 /* R */
1230 #define highlighting_lexer_R SCLEX_R
1231 static const HLStyle highlighting_styles_R[] =
1233 { SCE_R_DEFAULT, "default", FALSE },
1234 { SCE_R_COMMENT, "comment", FALSE },
1235 { SCE_R_KWORD, "kword", FALSE },
1236 { SCE_R_OPERATOR, "operator", FALSE },
1237 { SCE_R_BASEKWORD, "basekword", FALSE },
1238 { SCE_R_OTHERKWORD, "otherkword", FALSE },
1239 { SCE_R_NUMBER, "number", FALSE },
1240 { SCE_R_STRING, "string", FALSE },
1241 { SCE_R_STRING2, "string2", FALSE },
1242 { SCE_R_IDENTIFIER, "identifier", FALSE },
1243 { SCE_R_INFIX, "infix", FALSE },
1244 { SCE_R_INFIXEOL, "infixeol", FALSE }
1246 static const HLKeyword highlighting_keywords_R[] =
1248 { 0, "primary", FALSE },
1249 { 1, "package", FALSE },
1250 { 2, "package_other", FALSE }
1252 #define highlighting_properties_R EMPTY_PROPERTIES
1255 /* Ruby */
1256 #define highlighting_lexer_RUBY SCLEX_RUBY
1257 static const HLStyle highlighting_styles_RUBY[] =
1259 { SCE_RB_DEFAULT, "default", FALSE },
1260 { SCE_RB_COMMENTLINE, "commentline", FALSE },
1261 { SCE_RB_NUMBER, "number", FALSE },
1262 { SCE_RB_STRING, "string", FALSE },
1263 { SCE_RB_CHARACTER, "character", FALSE },
1264 { SCE_RB_WORD, "word", FALSE },
1265 { SCE_RB_GLOBAL, "global", FALSE },
1266 { SCE_RB_SYMBOL, "symbol", FALSE },
1267 { SCE_RB_CLASSNAME, "classname", FALSE },
1268 { SCE_RB_DEFNAME, "defname", FALSE },
1269 { SCE_RB_OPERATOR, "operator", FALSE },
1270 { SCE_RB_IDENTIFIER, "identifier", FALSE },
1271 { SCE_RB_MODULE_NAME, "modulename", FALSE },
1272 { SCE_RB_BACKTICKS, "backticks", FALSE },
1273 { SCE_RB_INSTANCE_VAR, "instancevar", FALSE },
1274 { SCE_RB_CLASS_VAR, "classvar", FALSE },
1275 { SCE_RB_DATASECTION, "datasection", FALSE },
1276 { SCE_RB_HERE_DELIM, "heredelim", FALSE },
1277 { SCE_RB_WORD_DEMOTED, "worddemoted", FALSE },
1278 { SCE_RB_STDIN, "stdin", FALSE },
1279 { SCE_RB_STDOUT, "stdout", FALSE },
1280 { SCE_RB_STDERR, "stderr", FALSE },
1281 { SCE_RB_REGEX, "regex", FALSE },
1282 { SCE_RB_HERE_Q, "here_q", FALSE },
1283 { SCE_RB_HERE_QQ, "here_qq", FALSE },
1284 { SCE_RB_HERE_QX, "here_qx", FALSE },
1285 { SCE_RB_STRING_Q, "string_q", FALSE },
1286 { SCE_RB_STRING_QQ, "string_qq", FALSE },
1287 { SCE_RB_STRING_QX, "string_qx", FALSE },
1288 { SCE_RB_STRING_QR, "string_qr", FALSE },
1289 { SCE_RB_STRING_QW, "string_qw", FALSE },
1290 { SCE_RB_UPPER_BOUND, "upper_bound", FALSE },
1291 { SCE_RB_ERROR, "error", FALSE },
1292 { SCE_RB_POD, "pod", FALSE }
1294 static const HLKeyword highlighting_keywords_RUBY[] =
1296 { 0, "primary", FALSE }
1298 #define highlighting_properties_RUBY EMPTY_PROPERTIES
1300 /* Rust */
1301 #define highlighting_lexer_RUST SCLEX_RUST
1302 static const HLStyle highlighting_styles_RUST[] =
1304 { SCE_RUST_DEFAULT, "default", FALSE },
1305 { SCE_RUST_COMMENTBLOCK, "commentblock", FALSE },
1306 { SCE_RUST_COMMENTLINE, "commentline", FALSE },
1307 { SCE_RUST_COMMENTBLOCKDOC, "commentblockdoc", FALSE },
1308 { SCE_RUST_COMMENTLINEDOC, "commentlinedoc", FALSE },
1309 { SCE_RUST_NUMBER, "number", FALSE },
1310 { SCE_RUST_WORD, "word", FALSE },
1311 { SCE_RUST_WORD2, "word2", FALSE },
1312 { SCE_RUST_WORD3, "word3", FALSE },
1313 { SCE_RUST_WORD4, "word4", FALSE },
1314 { SCE_RUST_WORD5, "word5", FALSE },
1315 { SCE_RUST_WORD6, "word6", FALSE },
1316 { SCE_RUST_WORD7, "word7", FALSE },
1317 { SCE_RUST_STRING, "string", FALSE },
1318 { SCE_RUST_STRINGR, "stringraw", FALSE },
1319 { SCE_RUST_CHARACTER, "character", FALSE },
1320 { SCE_RUST_OPERATOR, "operator", FALSE },
1321 { SCE_RUST_IDENTIFIER, "identifier", FALSE },
1322 { SCE_RUST_LIFETIME, "lifetime", FALSE },
1323 { SCE_RUST_MACRO, "macro", FALSE },
1324 { SCE_RUST_LEXERROR, "lexerror", FALSE }
1326 static const HLKeyword highlighting_keywords_RUST[] =
1328 { 0, "primary", FALSE },
1329 /* SCI_SETKEYWORDS = 1 - secondary + global tags file types */
1330 { 1, "secondary", TRUE },
1331 { 2, "tertiary", FALSE },
1332 /* SCI_SETKEYWORDS = 3 is for current session types - see editor_lexer_get_type_keyword_idx() */
1334 #define highlighting_properties_RUST EMPTY_PROPERTIES
1336 /* SH */
1337 #define highlighting_lexer_SH SCLEX_BASH
1338 static const HLStyle highlighting_styles_SH[] =
1340 { SCE_SH_DEFAULT, "default", FALSE },
1341 { SCE_SH_COMMENTLINE, "commentline", FALSE },
1342 { SCE_SH_NUMBER, "number", FALSE },
1343 { SCE_SH_WORD, "word", FALSE },
1344 { SCE_SH_STRING, "string", FALSE },
1345 { SCE_SH_CHARACTER, "character", FALSE },
1346 { SCE_SH_OPERATOR, "operator", FALSE },
1347 { SCE_SH_IDENTIFIER, "identifier", FALSE },
1348 { SCE_SH_BACKTICKS, "backticks", FALSE },
1349 { SCE_SH_PARAM, "param", FALSE },
1350 { SCE_SH_SCALAR, "scalar", FALSE },
1351 { SCE_SH_ERROR, "error", FALSE },
1352 { SCE_SH_HERE_DELIM, "here_delim", FALSE },
1353 { SCE_SH_HERE_Q, "here_q", FALSE }
1355 static const HLKeyword highlighting_keywords_SH[] =
1357 { 0, "primary", FALSE }
1359 #define highlighting_properties_SH EMPTY_PROPERTIES
1362 /* SQL */
1363 #define highlighting_lexer_SQL SCLEX_SQL
1364 static const HLStyle highlighting_styles_SQL[] =
1366 { SCE_SQL_DEFAULT, "default", FALSE },
1367 { SCE_SQL_COMMENT, "comment", FALSE },
1368 { SCE_SQL_COMMENTLINE, "commentline", FALSE },
1369 { SCE_SQL_COMMENTDOC, "commentdoc", FALSE },
1370 { SCE_SQL_COMMENTLINEDOC, "commentlinedoc", FALSE },
1371 { SCE_SQL_COMMENTDOCKEYWORD, "commentdockeyword", FALSE },
1372 { SCE_SQL_COMMENTDOCKEYWORDERROR, "commentdockeyworderror", FALSE },
1373 { SCE_SQL_NUMBER, "number", FALSE },
1374 { SCE_SQL_WORD, "word", FALSE },
1375 { SCE_SQL_WORD2, "word2", FALSE },
1376 { SCE_SQL_STRING, "string", FALSE },
1377 { SCE_SQL_CHARACTER, "character", FALSE },
1378 { SCE_SQL_OPERATOR, "operator", FALSE },
1379 { SCE_SQL_IDENTIFIER, "identifier", FALSE },
1380 { SCE_SQL_SQLPLUS, "sqlplus", FALSE },
1381 { SCE_SQL_SQLPLUS_PROMPT, "sqlplus_prompt", FALSE },
1382 { SCE_SQL_SQLPLUS_COMMENT, "sqlplus_comment", FALSE },
1383 { SCE_SQL_QUOTEDIDENTIFIER, "quotedidentifier", FALSE }
1384 /* these are for user-defined keywords we don't set yet */
1385 /*{ SCE_SQL_USER1, "user1", FALSE },
1386 { SCE_SQL_USER2, "user2", FALSE },
1387 { SCE_SQL_USER3, "user3", FALSE },
1388 { SCE_SQL_USER4, "user4", FALSE }*/
1390 static const HLKeyword highlighting_keywords_SQL[] =
1392 { 0, "keywords", FALSE }
1394 #define highlighting_properties_SQL EMPTY_PROPERTIES
1397 /* TCL */
1398 #define highlighting_lexer_TCL SCLEX_TCL
1399 static const HLStyle highlighting_styles_TCL[] =
1401 { SCE_TCL_DEFAULT, "default", FALSE },
1402 { SCE_TCL_COMMENT, "comment", FALSE },
1403 { SCE_TCL_COMMENTLINE, "commentline", FALSE },
1404 { SCE_TCL_NUMBER, "number", FALSE },
1405 { SCE_TCL_OPERATOR, "operator", FALSE },
1406 { SCE_TCL_IDENTIFIER, "identifier", FALSE },
1407 { SCE_TCL_WORD_IN_QUOTE, "wordinquote", FALSE },
1408 { SCE_TCL_IN_QUOTE, "inquote", FALSE },
1409 { SCE_TCL_SUBSTITUTION, "substitution", FALSE },
1410 { SCE_TCL_MODIFIER, "modifier", FALSE },
1411 { SCE_TCL_EXPAND, "expand", FALSE },
1412 { SCE_TCL_WORD, "wordtcl", FALSE },
1413 { SCE_TCL_WORD2, "wordtk", FALSE },
1414 { SCE_TCL_WORD3, "worditcl", FALSE },
1415 { SCE_TCL_WORD4, "wordtkcmds", FALSE },
1416 { SCE_TCL_WORD5, "wordexpand", FALSE },
1417 { SCE_TCL_COMMENT_BOX, "commentbox", FALSE },
1418 { SCE_TCL_BLOCK_COMMENT, "blockcomment", FALSE },
1419 { SCE_TCL_SUB_BRACE, "subbrace", FALSE }
1420 /* these are for user-defined keywords we don't set yet */
1421 /*{ SCE_TCL_WORD6, "user2", FALSE },
1422 { SCE_TCL_WORD7, "user3", FALSE },
1423 { SCE_TCL_WORD8, "user4", FALSE }*/
1425 static const HLKeyword highlighting_keywords_TCL[] =
1427 { 0, "tcl", FALSE },
1428 { 1, "tk", FALSE },
1429 { 2, "itcl", FALSE },
1430 { 3, "tkcommands", FALSE },
1431 { 4, "expand", FALSE }
1433 #define highlighting_properties_TCL EMPTY_PROPERTIES
1436 /* Txt2Tags */
1437 #define highlighting_lexer_TXT2TAGS SCLEX_TXT2TAGS
1438 static const HLStyle highlighting_styles_TXT2TAGS[] =
1440 { SCE_TXT2TAGS_DEFAULT, "default", FALSE },
1441 { SCE_TXT2TAGS_LINE_BEGIN, "default", FALSE }, /* XIFME: remappings should be avoided */
1442 { SCE_TXT2TAGS_PRECHAR, "default", FALSE },
1443 { SCE_TXT2TAGS_STRONG1, "strong", FALSE },
1444 { SCE_TXT2TAGS_STRONG2, "strong", FALSE },
1445 { SCE_TXT2TAGS_EM1, "emphasis", FALSE },
1446 { SCE_TXT2TAGS_EM2, "underlined", FALSE }, /* WTF? */
1447 { SCE_TXT2TAGS_HEADER1, "header1", FALSE },
1448 { SCE_TXT2TAGS_HEADER2, "header2", FALSE },
1449 { SCE_TXT2TAGS_HEADER3, "header3", FALSE },
1450 { SCE_TXT2TAGS_HEADER4, "header4", FALSE },
1451 { SCE_TXT2TAGS_HEADER5, "header5", FALSE },
1452 { SCE_TXT2TAGS_HEADER6, "header6", FALSE },
1453 { SCE_TXT2TAGS_ULIST_ITEM, "ulist_item", FALSE },
1454 { SCE_TXT2TAGS_OLIST_ITEM, "olist_item", FALSE },
1455 { SCE_TXT2TAGS_BLOCKQUOTE, "blockquote", FALSE },
1456 { SCE_TXT2TAGS_STRIKEOUT, "strikeout", FALSE },
1457 { SCE_TXT2TAGS_HRULE, "hrule", FALSE },
1458 { SCE_TXT2TAGS_LINK, "link", FALSE },
1459 { SCE_TXT2TAGS_CODE, "code", FALSE },
1460 { SCE_TXT2TAGS_CODE2, "code", FALSE },
1461 { SCE_TXT2TAGS_CODEBK, "codebk", FALSE },
1462 { SCE_TXT2TAGS_COMMENT, "comment", FALSE },
1463 { SCE_TXT2TAGS_OPTION, "option", FALSE },
1464 { SCE_TXT2TAGS_PREPROC, "preproc", FALSE },
1465 { SCE_TXT2TAGS_POSTPROC, "postproc", FALSE }
1467 #define highlighting_keywords_TXT2TAGS EMPTY_KEYWORDS
1468 #define highlighting_properties_TXT2TAGS EMPTY_PROPERTIES
1471 /* VHDL */
1472 #define highlighting_lexer_VHDL SCLEX_VHDL
1473 static const HLStyle highlighting_styles_VHDL[] =
1475 { SCE_VHDL_DEFAULT, "default", FALSE },
1476 { SCE_VHDL_COMMENT, "comment", FALSE },
1477 { SCE_VHDL_COMMENTLINEBANG, "comment_line_bang", FALSE },
1478 { SCE_VHDL_NUMBER, "number", FALSE },
1479 { SCE_VHDL_STRING, "string", FALSE },
1480 { SCE_VHDL_OPERATOR, "operator", FALSE },
1481 { SCE_VHDL_IDENTIFIER, "identifier", FALSE },
1482 { SCE_VHDL_STRINGEOL, "stringeol", FALSE },
1483 { SCE_VHDL_KEYWORD, "keyword", FALSE },
1484 { SCE_VHDL_STDOPERATOR, "stdoperator", FALSE },
1485 { SCE_VHDL_ATTRIBUTE, "attribute", FALSE },
1486 { SCE_VHDL_STDFUNCTION, "stdfunction", FALSE },
1487 { SCE_VHDL_STDPACKAGE, "stdpackage", FALSE },
1488 { SCE_VHDL_STDTYPE, "stdtype", FALSE },
1489 { SCE_VHDL_USERWORD, "userword", FALSE }
1491 static const HLKeyword highlighting_keywords_VHDL[] =
1493 { 0, "keywords", FALSE },
1494 { 1, "operators", FALSE },
1495 { 2, "attributes", FALSE },
1496 { 3, "std_functions", FALSE },
1497 { 4, "std_packages", FALSE },
1498 { 5, "std_types", FALSE },
1499 { 6, "userwords", FALSE },
1501 #define highlighting_properties_VHDL EMPTY_PROPERTIES
1504 /* Verilog */
1505 #define highlighting_lexer_VERILOG SCLEX_VERILOG
1506 static const HLStyle highlighting_styles_VERILOG[] =
1508 { SCE_V_DEFAULT, "default", FALSE },
1509 { SCE_V_COMMENT, "comment", FALSE },
1510 { SCE_V_COMMENTLINE, "comment_line", FALSE },
1511 { SCE_V_COMMENTLINEBANG, "comment_line_bang", FALSE },
1512 { SCE_V_NUMBER, "number", FALSE },
1513 { SCE_V_WORD, "word", FALSE },
1514 { SCE_V_STRING, "string", FALSE },
1515 { SCE_V_WORD2, "word2", FALSE },
1516 { SCE_V_WORD3, "word3", FALSE },
1517 { SCE_V_PREPROCESSOR, "preprocessor", FALSE },
1518 { SCE_V_OPERATOR, "operator", FALSE },
1519 { SCE_V_IDENTIFIER, "identifier", FALSE },
1520 { SCE_V_STRINGEOL, "stringeol", FALSE },
1521 { SCE_V_USER, "userword", FALSE }
1523 static const HLKeyword highlighting_keywords_VERILOG[] =
1525 { 0, "word", FALSE },
1526 { 1, "word2", FALSE },
1527 { 2, "word3", FALSE }
1529 #define highlighting_properties_VERILOG EMPTY_PROPERTIES
1532 /* XML */
1533 #define highlighting_lexer_XML SCLEX_XML
1534 #define highlighting_styles_XML highlighting_styles_HTML
1535 static const HLKeyword highlighting_keywords_XML[] =
1537 { 5, "sgml", FALSE }
1539 #define highlighting_properties_XML highlighting_properties_HTML
1542 /* YAML */
1543 #define highlighting_lexer_YAML SCLEX_YAML
1544 static const HLStyle highlighting_styles_YAML[] =
1546 { SCE_YAML_DEFAULT, "default", FALSE },
1547 { SCE_YAML_COMMENT, "comment", FALSE },
1548 { SCE_YAML_IDENTIFIER, "identifier", FALSE },
1549 { SCE_YAML_KEYWORD, "keyword", FALSE },
1550 { SCE_YAML_NUMBER, "number", FALSE },
1551 { SCE_YAML_REFERENCE, "reference", FALSE },
1552 { SCE_YAML_DOCUMENT, "document", FALSE },
1553 { SCE_YAML_TEXT, "text", FALSE },
1554 { SCE_YAML_ERROR, "error", FALSE },
1555 { SCE_YAML_OPERATOR, "operator", FALSE }
1557 static const HLKeyword highlighting_keywords_YAML[] =
1559 { 0, "keywords", FALSE }
1561 #define highlighting_properties_YAML EMPTY_PROPERTIES
1564 #endif /* guard */