Update displayed copyright years
[geany-mirror.git] / src / highlightingmappings.h
blobd9316968752b63427408c9b30cd5cf606a84af9f
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_HIGHLIGHTING_MAPPINGS_H
25 #define GEANY_HIGHLIGHTING_MAPPINGS_H 1
27 #include "Scintilla.h"
28 #include "SciLexer.h"
30 #include <glib.h>
33 G_BEGIN_DECLS
35 /* contains all filtypes informations in the form of:
36 * - highlighting_lexer_LANG: the SCI lexer
37 * - highlighting_styles_LANG: SCI style/named style mappings. The first
38 * item is also used for the default style.
39 * - highlighting_keywords_LANG: keywords ID/name mappings
40 * - highlighting_properties_LANG: default SCI properties and their value
41 * where LANG is the lang part from GEANY_FILETYPE_LANG
43 * Using this scheme makes possible to automate style setup by simply listing LANG
44 * and let [init_]styleset_case() macros (in highlighting.c) prepare the correct
45 * calls.
49 typedef struct
51 guint style; /* SCI style */
52 const gchar *name; /* style name in the filetypes.* file */
53 gboolean fill_eol; /* whether to set EOLFILLED flag to this style */
54 } HLStyle;
56 typedef struct
58 guint id; /* SCI keyword ID */
59 const gchar *key; /* keywords entry name in the filetypes.* file */
60 gboolean merge; /* whether to merge with session types */
61 } HLKeyword;
63 typedef struct
65 const gchar *property;
66 const gchar *value;
67 } HLProperty;
70 #define EMPTY_KEYWORDS ((HLKeyword *) NULL)
71 #define EMPTY_PROPERTIES ((HLProperty *) NULL)
73 /* like G_N_ELEMENTS() but supports @array being NULL (for empty entries) */
74 #define HL_N_ENTRIES(array) ((array != NULL) ? G_N_ELEMENTS(array) : 0)
77 /* Abaqus */
78 #define highlighting_lexer_ABAQUS SCLEX_ABAQUS
79 static const HLStyle highlighting_styles_ABAQUS[] =
81 { SCE_ABAQUS_DEFAULT, "default", FALSE },
82 { SCE_ABAQUS_COMMENT, "comment", FALSE },
83 { SCE_ABAQUS_NUMBER, "number", FALSE },
84 { SCE_ABAQUS_STRING, "string", FALSE },
85 { SCE_ABAQUS_OPERATOR, "operator", FALSE },
86 { SCE_ABAQUS_PROCESSOR, "processor", FALSE },
87 { SCE_ABAQUS_STARCOMMAND, "starcommand", FALSE },
88 { SCE_ABAQUS_ARGUMENT, "argument", FALSE }
90 static const HLKeyword highlighting_keywords_ABAQUS[] =
92 { 0, "processors", FALSE },
93 { 1, "commands", FALSE },
94 { 2, "slashommands", FALSE },
95 { 3, "starcommands", FALSE },
96 { 4, "arguments", FALSE },
97 { 5, "functions", FALSE }
99 #define highlighting_properties_ABAQUS EMPTY_PROPERTIES
102 /* Ada */
103 #define highlighting_lexer_ADA SCLEX_ADA
104 static const HLStyle highlighting_styles_ADA[] =
106 { SCE_ADA_DEFAULT, "default", FALSE },
107 { SCE_ADA_WORD, "word", FALSE },
108 { SCE_ADA_IDENTIFIER, "identifier", FALSE },
109 { SCE_ADA_NUMBER, "number", FALSE },
110 { SCE_ADA_DELIMITER, "delimiter", FALSE },
111 { SCE_ADA_CHARACTER, "character", FALSE },
112 { SCE_ADA_CHARACTEREOL, "charactereol", FALSE },
113 { SCE_ADA_STRING, "string", FALSE },
114 { SCE_ADA_STRINGEOL, "stringeol", FALSE },
115 { SCE_ADA_LABEL, "label", FALSE },
116 { SCE_ADA_COMMENTLINE, "commentline", FALSE },
117 { SCE_ADA_ILLEGAL, "illegal", FALSE }
119 static const HLKeyword highlighting_keywords_ADA[] =
121 { 0, "primary", FALSE }
123 #define highlighting_properties_ADA EMPTY_PROPERTIES
126 /* ActionScript */
127 #define highlighting_lexer_AS SCLEX_CPP
128 #define highlighting_styles_AS highlighting_styles_C
129 static const HLKeyword highlighting_keywords_AS[] =
131 { 0, "primary", FALSE },
132 { 1, "secondary", FALSE },
133 { 3, "classes", FALSE }
135 #define highlighting_properties_AS highlighting_properties_C
138 /* ASM */
139 #define highlighting_lexer_ASM SCLEX_ASM
140 static const HLStyle highlighting_styles_ASM[] =
142 { SCE_ASM_DEFAULT, "default", FALSE },
143 { SCE_ASM_COMMENT, "comment", FALSE },
144 { SCE_ASM_NUMBER, "number", FALSE },
145 { SCE_ASM_STRING, "string", FALSE },
146 { SCE_ASM_OPERATOR, "operator", FALSE },
147 { SCE_ASM_IDENTIFIER, "identifier", FALSE },
148 { SCE_ASM_CPUINSTRUCTION, "cpuinstruction", FALSE },
149 { SCE_ASM_MATHINSTRUCTION, "mathinstruction", FALSE },
150 { SCE_ASM_REGISTER, "register", FALSE },
151 { SCE_ASM_DIRECTIVE, "directive", FALSE },
152 { SCE_ASM_DIRECTIVEOPERAND, "directiveoperand", FALSE },
153 { SCE_ASM_COMMENTBLOCK, "commentblock", FALSE },
154 { SCE_ASM_CHARACTER, "character", FALSE },
155 { SCE_ASM_STRINGEOL, "stringeol", FALSE },
156 { SCE_ASM_EXTINSTRUCTION, "extinstruction", FALSE },
157 { SCE_ASM_COMMENTDIRECTIVE, "commentdirective", FALSE }
159 static const HLKeyword highlighting_keywords_ASM[] =
161 { 0, "instructions", FALSE },
162 /*{ 1, "instructions", FALSE },*/
163 { 2, "registers", FALSE },
164 { 3, "directives", FALSE }
165 /*{ 5, "instructions", FALSE }*/
167 #define highlighting_properties_ASM EMPTY_PROPERTIES
170 /* BASIC */
171 #define highlighting_lexer_BASIC SCLEX_FREEBASIC
172 static const HLStyle highlighting_styles_BASIC[] =
174 { SCE_B_DEFAULT, "default", FALSE },
175 { SCE_B_COMMENT, "comment", FALSE },
176 { SCE_B_COMMENTBLOCK, "commentblock", FALSE },
177 { SCE_B_DOCLINE, "docline", FALSE },
178 { SCE_B_DOCBLOCK, "docblock", FALSE },
179 { SCE_B_DOCKEYWORD, "dockeyword", FALSE },
180 { SCE_B_NUMBER, "number", FALSE },
181 { SCE_B_KEYWORD, "word", FALSE },
182 { SCE_B_STRING, "string", FALSE },
183 { SCE_B_PREPROCESSOR, "preprocessor", FALSE },
184 { SCE_B_OPERATOR, "operator", FALSE },
185 { SCE_B_IDENTIFIER, "identifier", FALSE },
186 { SCE_B_DATE, "date", FALSE },
187 { SCE_B_STRINGEOL, "stringeol", FALSE },
188 { SCE_B_KEYWORD2, "word2", FALSE },
189 { SCE_B_KEYWORD3, "word3", FALSE },
190 { SCE_B_KEYWORD4, "word4", FALSE },
191 { SCE_B_CONSTANT, "constant", FALSE },
192 { SCE_B_ASM, "asm", FALSE },
193 { SCE_B_LABEL, "label", FALSE },
194 { SCE_B_ERROR, "error", FALSE },
195 { SCE_B_HEXNUMBER, "hexnumber", FALSE },
196 { SCE_B_BINNUMBER, "binnumber", FALSE }
198 static const HLKeyword highlighting_keywords_BASIC[] =
200 { 0, "keywords", FALSE },
201 { 1, "preprocessor", FALSE },
202 { 2, "user1", FALSE },
203 { 3, "user2", FALSE }
205 #define highlighting_properties_BASIC EMPTY_PROPERTIES
208 /* BATCH */
209 #define highlighting_lexer_BATCH SCLEX_BATCH
210 static const HLStyle highlighting_styles_BATCH[] =
212 { SCE_BAT_DEFAULT, "default", FALSE },
213 { SCE_BAT_COMMENT, "comment", FALSE },
214 { SCE_BAT_LABEL, "label", FALSE },
215 { SCE_BAT_WORD, "word", FALSE },
216 { SCE_BAT_HIDE, "hide", FALSE },
217 { SCE_BAT_COMMAND, "command", FALSE },
218 { SCE_BAT_IDENTIFIER, "identifier", FALSE },
219 { SCE_BAT_OPERATOR, "operator", FALSE }
221 static const HLKeyword highlighting_keywords_BATCH[] =
223 { 0, "keywords", FALSE },
224 { 1, "keywords_optional", FALSE }
226 #define highlighting_properties_BATCH EMPTY_PROPERTIES
229 /* C */
230 /* Also used by some other SCLEX_CPP-based filetypes */
231 #define highlighting_lexer_C SCLEX_CPP
232 static const HLStyle highlighting_styles_C[] =
234 { SCE_C_DEFAULT, "default", FALSE },
235 { SCE_C_COMMENT, "comment", FALSE },
236 { SCE_C_COMMENTLINE, "commentline", FALSE },
237 { SCE_C_COMMENTDOC, "commentdoc", FALSE },
238 { SCE_C_PREPROCESSORCOMMENT, "preprocessorcomment", FALSE },
239 { SCE_C_PREPROCESSORCOMMENTDOC, "preprocessorcommentdoc", FALSE },
240 { SCE_C_NUMBER, "number", FALSE },
241 { SCE_C_WORD, "word", FALSE },
242 { SCE_C_WORD2, "word2", FALSE },
243 { SCE_C_STRING, "string", FALSE },
244 { SCE_C_STRINGRAW, "stringraw", FALSE },
245 { SCE_C_CHARACTER, "character", FALSE },
246 { SCE_C_USERLITERAL, "userliteral", FALSE },
247 { SCE_C_UUID, "uuid", FALSE },
248 { SCE_C_PREPROCESSOR, "preprocessor", FALSE },
249 { SCE_C_OPERATOR, "operator", FALSE },
250 { SCE_C_IDENTIFIER, "identifier", FALSE },
251 { SCE_C_STRINGEOL, "stringeol", FALSE },
252 { SCE_C_VERBATIM, "verbatim", FALSE },
253 /* triple verbatims use the same style */
254 { SCE_C_TRIPLEVERBATIM, "verbatim", FALSE },
255 { SCE_C_REGEX, "regex", FALSE },
256 { SCE_C_HASHQUOTEDSTRING, "hashquotedstring", FALSE },
257 { SCE_C_COMMENTLINEDOC, "commentlinedoc", FALSE },
258 { SCE_C_COMMENTDOCKEYWORD, "commentdockeyword", FALSE },
259 { SCE_C_COMMENTDOCKEYWORDERROR, "commentdockeyworderror", FALSE },
260 /* used for local structs and typedefs */
261 { SCE_C_GLOBALCLASS, "globalclass", FALSE },
262 { SCE_C_TASKMARKER, "taskmarker", FALSE },
263 { SCE_C_ESCAPESEQUENCE, "escapesequence", FALSE }
265 static const HLKeyword highlighting_keywords_C[] =
267 { 0, "primary", FALSE },
268 /* SCI_SETKEYWORDS = 1 - secondary + global tags file types, see below */
269 { 1, "secondary", TRUE },
270 { 2, "docComment", FALSE }
271 /* SCI_SETKEYWORDS = 3 is for current session types - see document_highlight_tags() */
273 static const HLProperty highlighting_properties_C[] =
275 { "fold.cpp.comment.explicit", "0" }
279 /* Caml */
280 #define highlighting_lexer_CAML SCLEX_CAML
281 static const HLStyle highlighting_styles_CAML[] =
283 { SCE_CAML_DEFAULT, "default", FALSE },
284 { SCE_CAML_COMMENT, "comment", FALSE },
285 { SCE_CAML_COMMENT1, "comment1", FALSE },
286 { SCE_CAML_COMMENT2, "comment2", FALSE },
287 { SCE_CAML_COMMENT3, "comment3", FALSE },
288 { SCE_CAML_NUMBER, "number", FALSE },
289 { SCE_CAML_KEYWORD, "keyword", FALSE },
290 { SCE_CAML_KEYWORD2, "keyword2", FALSE },
291 { SCE_CAML_KEYWORD3, "keyword3", FALSE },
292 { SCE_CAML_STRING, "string", FALSE },
293 { SCE_CAML_CHAR, "char", FALSE },
294 { SCE_CAML_OPERATOR, "operator", FALSE },
295 { SCE_CAML_IDENTIFIER, "identifier", FALSE },
296 { SCE_CAML_TAGNAME, "tagname", FALSE },
297 { SCE_CAML_LINENUM, "linenum", FALSE },
298 { SCE_CAML_WHITE, "white", FALSE }
300 static const HLKeyword highlighting_keywords_CAML[] =
302 { 0, "keywords", FALSE },
303 { 1, "keywords_optional", FALSE }
305 #define highlighting_properties_CAML EMPTY_PROPERTIES
308 /* CMake */
309 #define highlighting_lexer_CMAKE SCLEX_CMAKE
310 static const HLStyle highlighting_styles_CMAKE[] =
312 { SCE_CMAKE_DEFAULT, "default", FALSE },
313 { SCE_CMAKE_COMMENT, "comment", FALSE },
314 { SCE_CMAKE_STRINGDQ, "stringdq", FALSE },
315 { SCE_CMAKE_STRINGLQ, "stringlq", FALSE },
316 { SCE_CMAKE_STRINGRQ, "stringrq", FALSE },
317 { SCE_CMAKE_COMMANDS, "command", FALSE },
318 { SCE_CMAKE_PARAMETERS, "parameters", FALSE },
319 { SCE_CMAKE_VARIABLE, "variable", FALSE },
320 { SCE_CMAKE_USERDEFINED, "userdefined", FALSE },
321 { SCE_CMAKE_WHILEDEF, "whiledef", FALSE },
322 { SCE_CMAKE_FOREACHDEF, "foreachdef", FALSE },
323 { SCE_CMAKE_IFDEFINEDEF, "ifdefinedef", FALSE },
324 { SCE_CMAKE_MACRODEF, "macrodef", FALSE },
325 { SCE_CMAKE_STRINGVAR, "stringvar", FALSE },
326 { SCE_CMAKE_NUMBER, "number", FALSE }
328 static const HLKeyword highlighting_keywords_CMAKE[] =
330 { 0, "commands", FALSE },
331 { 1, "parameters", FALSE },
332 { 2, "userdefined", FALSE }
334 #define highlighting_properties_CMAKE EMPTY_PROPERTIES
336 /* CoffeeScript */
337 #define highlighting_lexer_COFFEESCRIPT SCLEX_COFFEESCRIPT
338 static const HLStyle highlighting_styles_COFFEESCRIPT[] =
340 { SCE_COFFEESCRIPT_DEFAULT, "default", FALSE },
341 { SCE_COFFEESCRIPT_COMMENTLINE, "commentline", FALSE },
342 { SCE_COFFEESCRIPT_NUMBER, "number", FALSE },
343 { SCE_COFFEESCRIPT_WORD, "word", FALSE },
344 { SCE_COFFEESCRIPT_STRING, "string", FALSE },
345 { SCE_COFFEESCRIPT_CHARACTER, "character", FALSE },
346 { SCE_COFFEESCRIPT_OPERATOR, "operator", FALSE },
347 { SCE_COFFEESCRIPT_IDENTIFIER, "identifier", FALSE },
348 { SCE_COFFEESCRIPT_STRINGEOL, "stringeol", FALSE },
349 { SCE_COFFEESCRIPT_REGEX, "regex", FALSE },
350 { SCE_COFFEESCRIPT_WORD2, "word2", FALSE },
351 { SCE_COFFEESCRIPT_GLOBALCLASS, "globalclass", FALSE },
352 { SCE_COFFEESCRIPT_COMMENTBLOCK, "commentblock", FALSE },
353 { SCE_COFFEESCRIPT_VERBOSE_REGEX, "verbose_regex", FALSE },
354 { SCE_COFFEESCRIPT_VERBOSE_REGEX_COMMENT, "verbose_regex_comment",FALSE },
355 { SCE_COFFEESCRIPT_INSTANCEPROPERTY, "instanceproperty", FALSE }
357 static const HLKeyword highlighting_keywords_COFFEESCRIPT[] =
359 { 0, "primary", FALSE },
360 { 1, "secondary", FALSE },
361 { 3, "globalclass", FALSE }
363 #define highlighting_properties_COFFEESCRIPT EMPTY_PROPERTIES
366 /* CSS */
367 #define highlighting_lexer_CSS SCLEX_CSS
368 static const HLStyle highlighting_styles_CSS[] =
370 { SCE_CSS_DEFAULT, "default", FALSE },
371 { SCE_CSS_COMMENT, "comment", FALSE },
372 { SCE_CSS_TAG, "tag", FALSE },
373 { SCE_CSS_CLASS, "class", FALSE },
374 { SCE_CSS_PSEUDOCLASS, "pseudoclass", FALSE },
375 { SCE_CSS_UNKNOWN_PSEUDOCLASS, "unknown_pseudoclass", FALSE },
376 { SCE_CSS_UNKNOWN_IDENTIFIER, "unknown_identifier", FALSE },
377 { SCE_CSS_OPERATOR, "operator", FALSE },
378 { SCE_CSS_IDENTIFIER, "identifier", FALSE },
379 { SCE_CSS_DOUBLESTRING, "doublestring", FALSE },
380 { SCE_CSS_SINGLESTRING, "singlestring", FALSE },
381 { SCE_CSS_ATTRIBUTE, "attribute", FALSE },
382 { SCE_CSS_VALUE, "value", FALSE },
383 { SCE_CSS_ID, "id", FALSE },
384 { SCE_CSS_IDENTIFIER2, "identifier2", FALSE },
385 { SCE_CSS_VARIABLE, "variable", FALSE },
386 { SCE_CSS_IMPORTANT, "important", FALSE },
387 { SCE_CSS_DIRECTIVE, "directive", FALSE },
388 { SCE_CSS_IDENTIFIER3, "identifier3", FALSE },
389 { SCE_CSS_PSEUDOELEMENT, "pseudoelement", FALSE },
390 { SCE_CSS_EXTENDED_IDENTIFIER, "extended_identifier", FALSE },
391 { SCE_CSS_EXTENDED_PSEUDOCLASS, "extended_pseudoclass", FALSE },
392 { SCE_CSS_EXTENDED_PSEUDOELEMENT, "extended_pseudoelement", FALSE },
393 { SCE_CSS_MEDIA, "media", FALSE }
395 static const HLKeyword highlighting_keywords_CSS[] =
397 { 0, "primary", FALSE },
398 { 1, "pseudoclasses", FALSE },
399 { 2, "secondary", FALSE },
400 { 3, "css3_properties", FALSE },
401 { 4, "pseudo_elements", FALSE },
402 { 5, "browser_css_properties", FALSE },
403 { 6, "browser_pseudo_classes", FALSE },
404 { 7, "browser_pseudo_elements", FALSE }
406 #define highlighting_properties_CSS EMPTY_PROPERTIES
409 /* Cobol */
410 #define highlighting_lexer_COBOL SCLEX_COBOL
411 #define highlighting_styles_COBOL highlighting_styles_C
412 static const HLKeyword highlighting_keywords_COBOL[] =
414 { 0, "primary", FALSE },
415 { 1, "secondary", FALSE },
416 { 2, "extended_keywords", FALSE }
418 #define highlighting_properties_COBOL highlighting_properties_C
421 /* Conf */
422 #define highlighting_lexer_CONF SCLEX_PROPERTIES
423 static const HLStyle highlighting_styles_CONF[] =
425 { SCE_PROPS_DEFAULT, "default", FALSE },
426 { SCE_PROPS_COMMENT, "comment", FALSE },
427 { SCE_PROPS_SECTION, "section", FALSE },
428 { SCE_PROPS_KEY, "key", FALSE },
429 { SCE_PROPS_ASSIGNMENT, "assignment", FALSE },
430 { SCE_PROPS_DEFVAL, "defval", FALSE }
432 #define highlighting_keywords_CONF EMPTY_KEYWORDS
433 #define highlighting_properties_CONF EMPTY_PROPERTIES
436 /* D */
437 #define highlighting_lexer_D SCLEX_D
438 static const HLStyle highlighting_styles_D[] =
440 { SCE_D_DEFAULT, "default", FALSE },
441 { SCE_D_COMMENT, "comment", FALSE },
442 { SCE_D_COMMENTLINE, "commentline", FALSE },
443 { SCE_D_COMMENTDOC, "commentdoc", FALSE },
444 { SCE_D_COMMENTNESTED, "commentnested", FALSE },
445 { SCE_D_NUMBER, "number", FALSE },
446 { SCE_D_WORD, "word", FALSE },
447 { SCE_D_WORD2, "word2", FALSE },
448 { SCE_D_WORD3, "word3", FALSE },
449 { SCE_D_TYPEDEF, "typedef", FALSE }, /* FIXME: don't remap here */
450 { SCE_D_WORD5, "typedef", FALSE },
451 { SCE_D_STRING, "string", FALSE },
452 { SCE_D_STRINGB, "string", FALSE },
453 { SCE_D_STRINGR, "string", FALSE },
454 { SCE_D_STRINGEOL, "stringeol", FALSE },
455 { SCE_D_CHARACTER, "character", FALSE },
456 { SCE_D_OPERATOR, "operator", FALSE },
457 { SCE_D_IDENTIFIER, "identifier", FALSE },
458 { SCE_D_COMMENTLINEDOC, "commentlinedoc", FALSE },
459 { SCE_D_COMMENTDOCKEYWORD, "commentdockeyword", FALSE },
460 { SCE_D_COMMENTDOCKEYWORDERROR, "commentdockeyworderror", FALSE }
461 /* these are for user-defined keywords we don't set yet */
462 /*{ SCE_D_WORD6, "word6", FALSE },
463 { SCE_D_WORD7, "word7", FALSE }*/
465 static const HLKeyword highlighting_keywords_D[] =
467 { 0, "primary", FALSE },
468 /* SCI_SETKEYWORDS = 1 - secondary + global tags file types */
469 { 1, "secondary", TRUE },
470 { 2, "docComment", FALSE },
471 /* SCI_SETKEYWORDS = 3 is for current session types - see document_highlight_tags() */
472 { 4, "types", FALSE },
474 #define highlighting_properties_D EMPTY_PROPERTIES
477 /* Diff */
478 #define highlighting_lexer_DIFF SCLEX_DIFF
479 static const HLStyle highlighting_styles_DIFF[] =
481 { SCE_DIFF_DEFAULT, "default", FALSE },
482 { SCE_DIFF_COMMENT, "comment", FALSE },
483 { SCE_DIFF_COMMAND, "command", FALSE },
484 { SCE_DIFF_HEADER, "header", FALSE },
485 { SCE_DIFF_POSITION, "position", FALSE },
486 { SCE_DIFF_DELETED, "deleted", FALSE },
487 { SCE_DIFF_ADDED, "added", FALSE },
488 { SCE_DIFF_CHANGED, "changed", FALSE }
490 #define highlighting_keywords_DIFF EMPTY_KEYWORDS
491 #define highlighting_properties_DIFF EMPTY_PROPERTIES
494 #define highlighting_lexer_DOCBOOK SCLEX_XML
495 static const HLStyle highlighting_styles_DOCBOOK[] =
497 { SCE_H_DEFAULT, "default", FALSE },
498 { SCE_H_TAG, "tag", FALSE },
499 { SCE_H_TAGUNKNOWN, "tagunknown", FALSE },
500 { SCE_H_ATTRIBUTE, "attribute", FALSE },
501 { SCE_H_ATTRIBUTEUNKNOWN, "attributeunknown", FALSE },
502 { SCE_H_NUMBER, "number", FALSE },
503 { SCE_H_DOUBLESTRING, "doublestring", FALSE },
504 { SCE_H_SINGLESTRING, "singlestring", FALSE },
505 { SCE_H_OTHER, "other", FALSE },
506 { SCE_H_COMMENT, "comment", FALSE },
507 { SCE_H_ENTITY, "entity", FALSE },
508 { SCE_H_TAGEND, "tagend", FALSE },
509 { SCE_H_XMLSTART, "xmlstart", TRUE },
510 { SCE_H_XMLEND, "xmlend", FALSE },
511 { SCE_H_CDATA, "cdata", FALSE },
512 { SCE_H_QUESTION, "question", FALSE },
513 { SCE_H_VALUE, "value", FALSE },
514 { SCE_H_XCCOMMENT, "xccomment", FALSE },
515 { SCE_H_SGML_DEFAULT, "sgml_default", FALSE },
516 { SCE_H_SGML_COMMENT, "sgml_comment", FALSE },
517 { SCE_H_SGML_SPECIAL, "sgml_special", FALSE },
518 { SCE_H_SGML_COMMAND, "sgml_command", FALSE },
519 { SCE_H_SGML_DOUBLESTRING, "sgml_doublestring", FALSE },
520 { SCE_H_SGML_SIMPLESTRING, "sgml_simplestring", FALSE },
521 { SCE_H_SGML_1ST_PARAM, "sgml_1st_param", FALSE },
522 { SCE_H_SGML_ENTITY, "sgml_entity", FALSE },
523 { SCE_H_SGML_BLOCK_DEFAULT, "sgml_block_default", FALSE },
524 { SCE_H_SGML_1ST_PARAM_COMMENT, "sgml_1st_param_comment", FALSE },
525 { SCE_H_SGML_ERROR, "sgml_error", FALSE }
527 static const HLKeyword highlighting_keywords_DOCBOOK[] =
529 { 0, "elements", FALSE },
530 { 5, "dtd", FALSE }
532 #define highlighting_properties_DOCBOOK EMPTY_PROPERTIES
535 /* Erlang */
536 #define highlighting_lexer_ERLANG SCLEX_ERLANG
537 static const HLStyle highlighting_styles_ERLANG[] =
539 { SCE_ERLANG_DEFAULT, "default", FALSE },
540 { SCE_ERLANG_COMMENT, "comment", FALSE },
541 { SCE_ERLANG_VARIABLE, "variable", FALSE },
542 { SCE_ERLANG_NUMBER, "number", FALSE },
543 { SCE_ERLANG_KEYWORD, "keyword", FALSE },
544 { SCE_ERLANG_STRING, "string", FALSE },
545 { SCE_ERLANG_OPERATOR, "operator", FALSE },
546 { SCE_ERLANG_ATOM, "atom", FALSE },
547 { SCE_ERLANG_FUNCTION_NAME, "function_name", FALSE },
548 { SCE_ERLANG_CHARACTER, "character", FALSE },
549 { SCE_ERLANG_MACRO, "macro", FALSE },
550 { SCE_ERLANG_RECORD, "record", FALSE },
551 { SCE_ERLANG_PREPROC, "preproc", FALSE },
552 { SCE_ERLANG_NODE_NAME, "node_name", FALSE },
553 { SCE_ERLANG_COMMENT_FUNCTION, "comment_function", FALSE },
554 { SCE_ERLANG_COMMENT_MODULE, "comment_module", FALSE },
555 { SCE_ERLANG_COMMENT_DOC, "comment_doc", FALSE },
556 { SCE_ERLANG_COMMENT_DOC_MACRO, "comment_doc_macro", FALSE },
557 { SCE_ERLANG_ATOM_QUOTED, "atom_quoted", FALSE },
558 { SCE_ERLANG_MACRO_QUOTED, "macro_quoted", FALSE },
559 { SCE_ERLANG_RECORD_QUOTED, "record_quoted", FALSE },
560 { SCE_ERLANG_NODE_NAME_QUOTED, "node_name_quoted", FALSE },
561 { SCE_ERLANG_BIFS, "bifs", FALSE },
562 { SCE_ERLANG_MODULES, "modules", FALSE },
563 { SCE_ERLANG_MODULES_ATT, "modules_att", FALSE },
564 { SCE_ERLANG_UNKNOWN, "unknown", FALSE }
566 static const HLKeyword highlighting_keywords_ERLANG[] =
568 { 0, "keywords", FALSE },
569 { 1, "bifs", FALSE },
570 { 2, "preproc", FALSE },
571 { 3, "module", FALSE },
572 { 4, "doc", FALSE },
573 { 5, "doc_macro", FALSE }
575 #define highlighting_properties_ERLANG EMPTY_PROPERTIES
578 /* F77 */
579 #define highlighting_lexer_F77 SCLEX_F77
580 static const HLStyle highlighting_styles_F77[] =
582 { SCE_F_DEFAULT, "default", FALSE },
583 { SCE_F_COMMENT, "comment", FALSE },
584 { SCE_F_NUMBER, "number", FALSE },
585 { SCE_F_STRING1, "string", FALSE },
586 { SCE_F_OPERATOR, "operator", FALSE },
587 { SCE_F_IDENTIFIER, "identifier", FALSE },
588 { SCE_F_STRING2, "string2", FALSE },
589 { SCE_F_WORD, "word", FALSE },
590 { SCE_F_WORD2, "word2", FALSE },
591 { SCE_F_WORD3, "word3", FALSE },
592 { SCE_F_PREPROCESSOR, "preprocessor", FALSE },
593 { SCE_F_OPERATOR2, "operator2", FALSE },
594 { SCE_F_CONTINUATION, "continuation", FALSE },
595 { SCE_F_STRINGEOL, "stringeol", FALSE },
596 { SCE_F_LABEL, "label", FALSE }
598 static const HLKeyword highlighting_keywords_F77[] =
600 { 0, "primary", FALSE },
601 { 1, "intrinsic_functions", FALSE },
602 { 2, "user_functions", FALSE }
604 #define highlighting_properties_F77 EMPTY_PROPERTIES
607 /* Ferite */
608 #define highlighting_lexer_FERITE SCLEX_CPP
609 #define highlighting_styles_FERITE highlighting_styles_C
610 static const HLKeyword highlighting_keywords_FERITE[] =
612 { 0, "primary", FALSE },
613 { 1, "types", FALSE },
614 { 2, "docComment", FALSE }
616 #define highlighting_properties_FERITE highlighting_properties_C
619 /* Forth */
620 #define highlighting_lexer_FORTH SCLEX_FORTH
621 static const HLStyle highlighting_styles_FORTH[] =
623 { SCE_FORTH_DEFAULT, "default", FALSE },
624 { SCE_FORTH_COMMENT, "comment", FALSE },
625 { SCE_FORTH_COMMENT_ML, "commentml", FALSE },
626 { SCE_FORTH_IDENTIFIER, "identifier", FALSE },
627 { SCE_FORTH_CONTROL, "control", FALSE },
628 { SCE_FORTH_KEYWORD, "keyword", FALSE },
629 { SCE_FORTH_DEFWORD, "defword", FALSE },
630 { SCE_FORTH_PREWORD1, "preword1", FALSE },
631 { SCE_FORTH_PREWORD2, "preword2", FALSE },
632 { SCE_FORTH_NUMBER, "number", FALSE },
633 { SCE_FORTH_STRING, "string", FALSE },
634 { SCE_FORTH_LOCALE, "locale", FALSE }
636 static const HLKeyword highlighting_keywords_FORTH[] =
638 { 0, "primary", FALSE },
639 { 1, "keyword", FALSE },
640 { 2, "defword", FALSE },
641 { 3, "preword1", FALSE },
642 { 4, "preword2", FALSE },
643 { 5, "string", FALSE }
645 #define highlighting_properties_FORTH EMPTY_PROPERTIES
648 /* Fortran */
649 /* F77 and Fortran (F9x) uses different lexers but shares styles and keywords */
650 #define highlighting_lexer_FORTRAN SCLEX_FORTRAN
651 #define highlighting_styles_FORTRAN highlighting_styles_F77
652 #define highlighting_keywords_FORTRAN highlighting_keywords_F77
653 #define highlighting_properties_FORTRAN highlighting_properties_F77
656 /* Go */
657 #define highlighting_lexer_GO SCLEX_CPP
658 #define highlighting_styles_GO highlighting_styles_C
659 #define highlighting_keywords_GO highlighting_keywords_C
660 #define highlighting_properties_GO highlighting_properties_C
663 /* Haskell */
664 #define highlighting_lexer_HASKELL SCLEX_HASKELL
665 static const HLStyle highlighting_styles_HASKELL[] =
667 { SCE_HA_DEFAULT, "default", FALSE },
668 { SCE_HA_COMMENTLINE, "commentline", FALSE },
669 { SCE_HA_COMMENTBLOCK, "commentblock", FALSE },
670 { SCE_HA_COMMENTBLOCK2, "commentblock2", FALSE },
671 { SCE_HA_COMMENTBLOCK3, "commentblock3", FALSE },
672 { SCE_HA_NUMBER, "number", FALSE },
673 { SCE_HA_KEYWORD, "keyword", FALSE },
674 { SCE_HA_IMPORT, "import", FALSE },
675 { SCE_HA_STRING, "string", FALSE },
676 { SCE_HA_CHARACTER, "character", FALSE },
677 { SCE_HA_CLASS, "class", FALSE },
678 { SCE_HA_OPERATOR, "operator", FALSE },
679 { SCE_HA_IDENTIFIER, "identifier", FALSE },
680 { SCE_HA_INSTANCE, "instance", FALSE },
681 { SCE_HA_CAPITAL, "capital", FALSE },
682 { SCE_HA_MODULE, "module", FALSE },
683 { SCE_HA_DATA, "data", FALSE },
684 { SCE_HA_PRAGMA, "pragma", FALSE },
685 { SCE_HA_PREPROCESSOR, "preprocessor", FALSE },
686 { SCE_HA_STRINGEOL, "stringeol", FALSE },
687 { SCE_HA_RESERVED_OPERATOR, "reserved_operator", FALSE },
688 { SCE_HA_LITERATE_COMMENT, "literate_comment", FALSE },
689 { SCE_HA_LITERATE_CODEDELIM, "literate_codedelim", FALSE }
691 static const HLKeyword highlighting_keywords_HASKELL[] =
693 { 0, "keywords", FALSE },
694 { 1, "ffi", FALSE },
695 { 2, "reserved_operators", FALSE }
697 #define highlighting_properties_HASKELL EMPTY_PROPERTIES
700 /* HAXE */
701 #define highlighting_lexer_HAXE SCLEX_CPP
702 #define highlighting_styles_HAXE highlighting_styles_C
703 static const HLKeyword highlighting_keywords_HAXE[] =
705 { 0, "primary", FALSE },
706 { 1, "secondary", FALSE },
707 { 3, "classes", FALSE }
709 #define highlighting_properties_HAXE highlighting_properties_C
712 /* HTML */
713 #define highlighting_lexer_HTML SCLEX_HTML
714 static const HLStyle highlighting_styles_HTML[] =
716 { SCE_H_DEFAULT, "html_default", FALSE },
717 { SCE_H_TAG, "html_tag", FALSE },
718 { SCE_H_TAGUNKNOWN, "html_tagunknown", FALSE },
719 { SCE_H_ATTRIBUTE, "html_attribute", FALSE },
720 { SCE_H_ATTRIBUTEUNKNOWN, "html_attributeunknown", FALSE },
721 { SCE_H_NUMBER, "html_number", FALSE },
722 { SCE_H_DOUBLESTRING, "html_doublestring", FALSE },
723 { SCE_H_SINGLESTRING, "html_singlestring", FALSE },
724 { SCE_H_OTHER, "html_other", FALSE },
725 { SCE_H_COMMENT, "html_comment", FALSE },
726 { SCE_H_ENTITY, "html_entity", FALSE },
727 { SCE_H_TAGEND, "html_tagend", FALSE },
728 { SCE_H_XMLSTART, "html_xmlstart", TRUE },
729 { SCE_H_XMLEND, "html_xmlend", FALSE },
730 { SCE_H_SCRIPT, "html_script", FALSE },
731 { SCE_H_ASP, "html_asp", TRUE },
732 { SCE_H_ASPAT, "html_aspat", TRUE },
733 { SCE_H_CDATA, "html_cdata", FALSE },
734 { SCE_H_QUESTION, "html_question", FALSE },
735 { SCE_H_VALUE, "html_value", FALSE },
736 { SCE_H_XCCOMMENT, "html_xccomment", FALSE },
738 { SCE_H_SGML_DEFAULT, "sgml_default", FALSE },
739 { SCE_H_SGML_COMMENT, "sgml_comment", FALSE },
740 { SCE_H_SGML_SPECIAL, "sgml_special", FALSE },
741 { SCE_H_SGML_COMMAND, "sgml_command", FALSE },
742 { SCE_H_SGML_DOUBLESTRING, "sgml_doublestring", FALSE },
743 { SCE_H_SGML_SIMPLESTRING, "sgml_simplestring", FALSE },
744 { SCE_H_SGML_1ST_PARAM, "sgml_1st_param", FALSE },
745 { SCE_H_SGML_ENTITY, "sgml_entity", FALSE },
746 { SCE_H_SGML_BLOCK_DEFAULT, "sgml_block_default", FALSE },
747 { SCE_H_SGML_1ST_PARAM_COMMENT, "sgml_1st_param_comment", FALSE },
748 { SCE_H_SGML_ERROR, "sgml_error", FALSE },
750 /* embedded JavaScript */
751 { SCE_HJ_START, "jscript_start", FALSE },
752 { SCE_HJ_DEFAULT, "jscript_default", FALSE },
753 { SCE_HJ_COMMENT, "jscript_comment", FALSE },
754 { SCE_HJ_COMMENTLINE, "jscript_commentline", FALSE },
755 { SCE_HJ_COMMENTDOC, "jscript_commentdoc", FALSE },
756 { SCE_HJ_NUMBER, "jscript_number", FALSE },
757 { SCE_HJ_WORD, "jscript_word", FALSE },
758 { SCE_HJ_KEYWORD, "jscript_keyword", FALSE },
759 { SCE_HJ_DOUBLESTRING, "jscript_doublestring", FALSE },
760 { SCE_HJ_SINGLESTRING, "jscript_singlestring", FALSE },
761 { SCE_HJ_SYMBOLS, "jscript_symbols", FALSE },
762 { SCE_HJ_STRINGEOL, "jscript_stringeol", FALSE },
763 { SCE_HJ_REGEX, "jscript_regex", FALSE },
765 /* for HB, VBScript?, use the same styles as for JavaScript */
766 { SCE_HB_START, "jscript_start", FALSE },
767 { SCE_HB_DEFAULT, "jscript_default", FALSE },
768 { SCE_HB_COMMENTLINE, "jscript_commentline", FALSE },
769 { SCE_HB_NUMBER, "jscript_number", FALSE },
770 { SCE_HB_WORD, "jscript_keyword", FALSE }, /* keywords */
771 { SCE_HB_STRING, "jscript_doublestring", FALSE },
772 { SCE_HB_IDENTIFIER, "jscript_symbols", FALSE },
773 { SCE_HB_STRINGEOL, "jscript_stringeol", FALSE },
775 /* for HBA, VBScript?, use the same styles as for JavaScript */
776 { SCE_HBA_START, "jscript_start", FALSE },
777 { SCE_HBA_DEFAULT, "jscript_default", FALSE },
778 { SCE_HBA_COMMENTLINE, "jscript_commentline", FALSE },
779 { SCE_HBA_NUMBER, "jscript_number", FALSE },
780 { SCE_HBA_WORD, "jscript_keyword", FALSE }, /* keywords */
781 { SCE_HBA_STRING, "jscript_doublestring", FALSE },
782 { SCE_HBA_IDENTIFIER, "jscript_symbols", FALSE },
783 { SCE_HBA_STRINGEOL, "jscript_stringeol", FALSE },
785 /* for HJA, ASP Javascript, use the same styles as for JavaScript */
786 { SCE_HJA_START, "jscript_start", FALSE },
787 { SCE_HJA_DEFAULT, "jscript_default", FALSE },
788 { SCE_HJA_COMMENT, "jscript_comment", FALSE },
789 { SCE_HJA_COMMENTLINE, "jscript_commentline", FALSE },
790 { SCE_HJA_COMMENTDOC, "jscript_commentdoc", FALSE },
791 { SCE_HJA_NUMBER, "jscript_number", FALSE },
792 { SCE_HJA_WORD, "jscript_word", FALSE },
793 { SCE_HJA_KEYWORD, "jscript_keyword", FALSE },
794 { SCE_HJA_DOUBLESTRING, "jscript_doublestring", FALSE },
795 { SCE_HJA_SINGLESTRING, "jscript_singlestring", FALSE },
796 { SCE_HJA_SYMBOLS, "jscript_symbols", FALSE },
797 { SCE_HJA_STRINGEOL, "jscript_stringeol", FALSE },
798 { SCE_HJA_REGEX, "jscript_regex", FALSE },
800 /* embedded Python */
801 { SCE_HP_START, "jscript_start", FALSE },
802 { SCE_HP_DEFAULT, "python_default", FALSE },
803 { SCE_HP_COMMENTLINE, "python_commentline", FALSE },
804 { SCE_HP_NUMBER, "python_number", FALSE },
805 { SCE_HP_STRING, "python_string", FALSE },
806 { SCE_HP_CHARACTER, "python_character", FALSE },
807 { SCE_HP_WORD, "python_word", FALSE },
808 { SCE_HP_TRIPLE, "python_triple", FALSE },
809 { SCE_HP_TRIPLEDOUBLE, "python_tripledouble", FALSE },
810 { SCE_HP_CLASSNAME, "python_classname", FALSE },
811 { SCE_HP_DEFNAME, "python_defname", FALSE },
812 { SCE_HP_OPERATOR, "python_operator", FALSE },
813 { SCE_HP_IDENTIFIER, "python_identifier", FALSE },
815 /* for embedded HPA (what is this?) we use the Python styles */
816 { SCE_HPA_START, "jscript_start", FALSE },
817 { SCE_HPA_DEFAULT, "python_default", FALSE },
818 { SCE_HPA_COMMENTLINE, "python_commentline", FALSE },
819 { SCE_HPA_NUMBER, "python_number", FALSE },
820 { SCE_HPA_STRING, "python_string", FALSE },
821 { SCE_HPA_CHARACTER, "python_character", FALSE },
822 { SCE_HPA_WORD, "python_word", FALSE },
823 { SCE_HPA_TRIPLE, "python_triple", FALSE },
824 { SCE_HPA_TRIPLEDOUBLE, "python_tripledouble", FALSE },
825 { SCE_HPA_CLASSNAME, "python_classname", FALSE },
826 { SCE_HPA_DEFNAME, "python_defname", FALSE },
827 { SCE_HPA_OPERATOR, "python_operator", FALSE },
828 { SCE_HPA_IDENTIFIER, "python_identifier", FALSE },
830 /* PHP */
831 { SCE_HPHP_DEFAULT, "php_default", FALSE },
832 { SCE_HPHP_SIMPLESTRING, "php_simplestring", FALSE },
833 { SCE_HPHP_HSTRING, "php_hstring", FALSE },
834 { SCE_HPHP_NUMBER, "php_number", FALSE },
835 { SCE_HPHP_WORD, "php_word", FALSE },
836 { SCE_HPHP_VARIABLE, "php_variable", FALSE },
837 { SCE_HPHP_COMMENT, "php_comment", FALSE },
838 { SCE_HPHP_COMMENTLINE, "php_commentline", FALSE },
839 { SCE_HPHP_OPERATOR, "php_operator", FALSE },
840 { SCE_HPHP_HSTRING_VARIABLE, "php_hstring_variable", FALSE },
841 { SCE_HPHP_COMPLEX_VARIABLE, "php_complex_variable", FALSE }
843 static const HLKeyword highlighting_keywords_HTML[] =
845 { 0, "html", FALSE },
846 { 1, "javascript", FALSE },
847 { 2, "vbscript", FALSE },
848 { 3, "python", FALSE },
849 { 4, "php", FALSE },
850 { 5, "sgml", FALSE }
852 static const HLProperty highlighting_properties_HTML[] =
854 { "fold.html", "1" },
855 { "fold.html.preprocessor", "0" }
859 /* Java */
860 #define highlighting_lexer_JAVA SCLEX_CPP
861 #define highlighting_styles_JAVA highlighting_styles_C
862 static const HLKeyword highlighting_keywords_JAVA[] =
864 { 0, "primary", FALSE },
865 /* SCI_SETKEYWORDS = 1 - secondary + global tags file types, see below */
866 { 1, "secondary", TRUE },
867 { 2, "doccomment", FALSE },
868 /* SCI_SETKEYWORDS = 3 is for current session types - see document_highlight_tags() */
869 { 4, "typedefs", FALSE }
871 #define highlighting_properties_JAVA highlighting_properties_C
874 /* JavaScript */
875 #define highlighting_lexer_JS SCLEX_CPP
876 #define highlighting_styles_JS highlighting_styles_C
877 static const HLKeyword highlighting_keywords_JS[] =
879 { 0, "primary", FALSE },
880 { 1, "secondary", FALSE }
882 #define highlighting_properties_JS highlighting_properties_C
885 /* LaTeX */
886 #define highlighting_lexer_LATEX SCLEX_LATEX
887 static const HLStyle highlighting_styles_LATEX[] =
889 { SCE_L_DEFAULT, "default", FALSE },
890 { SCE_L_COMMAND, "command", FALSE },
891 { SCE_L_TAG, "tag", FALSE },
892 { SCE_L_MATH, "math", FALSE },
893 { SCE_L_COMMENT, "comment", FALSE },
894 { SCE_L_TAG2, "tag2", FALSE },
895 { SCE_L_MATH2, "math2", FALSE },
896 { SCE_L_COMMENT2, "comment2", FALSE },
897 { SCE_L_VERBATIM, "verbatim", FALSE },
898 { SCE_L_SHORTCMD, "shortcmd", FALSE },
899 { SCE_L_SPECIAL, "special", FALSE },
900 { SCE_L_CMDOPT, "cmdopt", FALSE },
901 { SCE_L_ERROR, "error", FALSE }
903 static const HLKeyword highlighting_keywords_LATEX[] =
905 { 0, "primary", FALSE }
907 #define highlighting_properties_LATEX EMPTY_PROPERTIES
910 /* Lisp */
911 #define highlighting_lexer_LISP SCLEX_LISP
912 static const HLStyle highlighting_styles_LISP[] =
914 { SCE_LISP_DEFAULT, "default", FALSE },
915 { SCE_LISP_COMMENT, "comment", FALSE },
916 { SCE_LISP_MULTI_COMMENT, "multicomment", FALSE },
917 { SCE_LISP_NUMBER, "number", FALSE },
918 { SCE_LISP_KEYWORD, "keyword", FALSE },
919 { SCE_LISP_SYMBOL, "symbol", FALSE },
920 { SCE_LISP_STRING, "string", FALSE },
921 { SCE_LISP_STRINGEOL, "stringeol", FALSE },
922 { SCE_LISP_IDENTIFIER, "identifier", FALSE },
923 { SCE_LISP_OPERATOR, "operator", FALSE },
924 { SCE_LISP_SPECIAL, "special", FALSE },
925 { SCE_LISP_KEYWORD_KW, "keywordkw", FALSE }
927 static const HLKeyword highlighting_keywords_LISP[] =
929 { 0, "keywords", FALSE },
930 { 1, "special_keywords", FALSE }
932 #define highlighting_properties_LISP EMPTY_PROPERTIES
935 /* Lua */
936 #define highlighting_lexer_LUA SCLEX_LUA
937 static const HLStyle highlighting_styles_LUA[] =
939 { SCE_LUA_DEFAULT, "default", FALSE },
940 { SCE_LUA_COMMENT, "comment", FALSE },
941 { SCE_LUA_COMMENTLINE, "commentline", FALSE },
942 { SCE_LUA_COMMENTDOC, "commentdoc", FALSE },
943 { SCE_LUA_NUMBER, "number", FALSE },
944 { SCE_LUA_WORD, "word", FALSE },
945 { SCE_LUA_STRING, "string", FALSE },
946 { SCE_LUA_CHARACTER, "character", FALSE },
947 { SCE_LUA_LITERALSTRING, "literalstring", FALSE },
948 { SCE_LUA_PREPROCESSOR, "preprocessor", FALSE },
949 { SCE_LUA_OPERATOR, "operator", FALSE },
950 { SCE_LUA_IDENTIFIER, "identifier", FALSE },
951 { SCE_LUA_STRINGEOL, "stringeol", FALSE },
952 { SCE_LUA_WORD2, "function_basic", FALSE },
953 { SCE_LUA_WORD3, "function_other", FALSE },
954 { SCE_LUA_WORD4, "coroutines", FALSE },
955 { SCE_LUA_WORD5, "word5", FALSE },
956 { SCE_LUA_WORD6, "word6", FALSE },
957 { SCE_LUA_WORD7, "word7", FALSE },
958 { SCE_LUA_WORD8, "word8", FALSE },
959 { SCE_LUA_LABEL, "label", FALSE }
961 static const HLKeyword highlighting_keywords_LUA[] =
963 { 0, "keywords", FALSE },
964 { 1, "function_basic", FALSE },
965 { 2, "function_other", FALSE },
966 { 3, "coroutines", FALSE },
967 { 4, "user1", FALSE },
968 { 5, "user2", FALSE },
969 { 6, "user3", FALSE },
970 { 7, "user4", FALSE }
972 #define highlighting_properties_LUA EMPTY_PROPERTIES
975 /* Makefile */
976 #define highlighting_lexer_MAKE SCLEX_MAKEFILE
977 static const HLStyle highlighting_styles_MAKE[] =
979 { SCE_MAKE_DEFAULT, "default", FALSE },
980 { SCE_MAKE_COMMENT, "comment", FALSE },
981 { SCE_MAKE_PREPROCESSOR, "preprocessor", FALSE },
982 { SCE_MAKE_IDENTIFIER, "identifier", FALSE },
983 { SCE_MAKE_OPERATOR, "operator", FALSE },
984 { SCE_MAKE_TARGET, "target", FALSE },
985 { SCE_MAKE_IDEOL, "ideol", FALSE }
987 #define highlighting_keywords_MAKE EMPTY_KEYWORDS
988 #define highlighting_properties_MAKE EMPTY_PROPERTIES
991 /* Markdown */
992 #define highlighting_lexer_MARKDOWN SCLEX_MARKDOWN
993 static const HLStyle highlighting_styles_MARKDOWN[] =
995 { SCE_MARKDOWN_DEFAULT, "default", FALSE },
996 { SCE_MARKDOWN_LINE_BEGIN, "default", FALSE }, /* FIXME: avoid in-code re-mappings */
997 { SCE_MARKDOWN_PRECHAR, "default", FALSE },
998 { SCE_MARKDOWN_STRONG1, "strong", FALSE },
999 { SCE_MARKDOWN_STRONG2, "strong", FALSE },
1000 { SCE_MARKDOWN_EM1, "emphasis", FALSE },
1001 { SCE_MARKDOWN_EM2, "emphasis", FALSE },
1002 { SCE_MARKDOWN_HEADER1, "header1", FALSE },
1003 { SCE_MARKDOWN_HEADER2, "header2", FALSE },
1004 { SCE_MARKDOWN_HEADER3, "header3", FALSE },
1005 { SCE_MARKDOWN_HEADER4, "header4", FALSE },
1006 { SCE_MARKDOWN_HEADER5, "header5", FALSE },
1007 { SCE_MARKDOWN_HEADER6, "header6", FALSE },
1008 { SCE_MARKDOWN_ULIST_ITEM, "ulist_item", FALSE },
1009 { SCE_MARKDOWN_OLIST_ITEM, "olist_item", FALSE },
1010 { SCE_MARKDOWN_BLOCKQUOTE, "blockquote", FALSE },
1011 { SCE_MARKDOWN_STRIKEOUT, "strikeout", FALSE },
1012 { SCE_MARKDOWN_HRULE, "hrule", FALSE },
1013 { SCE_MARKDOWN_LINK, "link", FALSE },
1014 { SCE_MARKDOWN_CODE, "code", FALSE },
1015 { SCE_MARKDOWN_CODE2, "code", FALSE },
1016 { SCE_MARKDOWN_CODEBK, "codebk", FALSE }
1018 #define highlighting_keywords_MARKDOWN EMPTY_KEYWORDS
1019 #define highlighting_properties_MARKDOWN EMPTY_PROPERTIES
1022 /* Matlab */
1023 #define highlighting_lexer_MATLAB SCLEX_OCTAVE /* not MATLAB to support Octave's # comments */
1024 static const HLStyle highlighting_styles_MATLAB[] =
1026 { SCE_MATLAB_DEFAULT, "default", FALSE },
1027 { SCE_MATLAB_COMMENT, "comment", FALSE },
1028 { SCE_MATLAB_COMMAND, "command", FALSE },
1029 { SCE_MATLAB_NUMBER, "number", FALSE },
1030 { SCE_MATLAB_KEYWORD, "keyword", FALSE },
1031 { SCE_MATLAB_STRING, "string", FALSE },
1032 { SCE_MATLAB_OPERATOR, "operator", FALSE },
1033 { SCE_MATLAB_IDENTIFIER, "identifier", FALSE },
1034 { SCE_MATLAB_DOUBLEQUOTESTRING, "doublequotedstring", FALSE }
1036 static const HLKeyword highlighting_keywords_MATLAB[] =
1038 { 0, "primary", FALSE }
1040 #define highlighting_properties_MATLAB EMPTY_PROPERTIES
1043 /* NSIS */
1044 #define highlighting_lexer_NSIS SCLEX_NSIS
1045 static const HLStyle highlighting_styles_NSIS[] =
1047 { SCE_NSIS_DEFAULT, "default", FALSE },
1048 { SCE_NSIS_COMMENT, "comment", FALSE },
1049 { SCE_NSIS_STRINGDQ, "stringdq", FALSE },
1050 { SCE_NSIS_STRINGLQ, "stringlq", FALSE },
1051 { SCE_NSIS_STRINGRQ, "stringrq", FALSE },
1052 { SCE_NSIS_FUNCTION, "function", FALSE },
1053 { SCE_NSIS_VARIABLE, "variable", FALSE },
1054 { SCE_NSIS_LABEL, "label", FALSE },
1055 { SCE_NSIS_USERDEFINED, "userdefined", FALSE },
1056 { SCE_NSIS_SECTIONDEF, "sectiondef", FALSE },
1057 { SCE_NSIS_SUBSECTIONDEF, "subsectiondef", FALSE },
1058 { SCE_NSIS_IFDEFINEDEF, "ifdefinedef", FALSE },
1059 { SCE_NSIS_MACRODEF, "macrodef", FALSE },
1060 { SCE_NSIS_STRINGVAR, "stringvar", FALSE },
1061 { SCE_NSIS_NUMBER, "number", FALSE },
1062 { SCE_NSIS_SECTIONGROUP, "sectiongroup", FALSE },
1063 { SCE_NSIS_PAGEEX, "pageex", FALSE },
1064 { SCE_NSIS_FUNCTIONDEF, "functiondef", FALSE },
1065 { SCE_NSIS_COMMENTBOX, "commentbox", FALSE }
1067 static const HLKeyword highlighting_keywords_NSIS[] =
1069 { 0, "functions", FALSE },
1070 { 1, "variables", FALSE },
1071 { 2, "lables", FALSE },
1072 { 3, "userdefined", FALSE }
1074 #define highlighting_properties_NSIS EMPTY_PROPERTIES
1077 /* Objective-C */
1078 #define highlighting_lexer_OBJECTIVEC highlighting_lexer_C
1079 #define highlighting_styles_OBJECTIVEC highlighting_styles_C
1080 static const HLKeyword highlighting_keywords_OBJECTIVEC[] =
1082 { 0, "primary", FALSE },
1083 /* SCI_SETKEYWORDS = 1 - secondary + global tags file types, see below */
1084 { 1, "secondary", TRUE },
1085 { 2, "docComment", FALSE }
1086 /* SCI_SETKEYWORDS = 3 is for current session types - see document_highlight_tags() */
1088 #define highlighting_properties_OBJECTIVEC highlighting_properties_C
1091 /* Pascal */
1092 #define highlighting_lexer_PASCAL SCLEX_PASCAL
1093 static const HLStyle highlighting_styles_PASCAL[] =
1095 { SCE_PAS_DEFAULT, "default", FALSE },
1096 { SCE_PAS_IDENTIFIER, "identifier", FALSE },
1097 { SCE_PAS_COMMENT, "comment", FALSE },
1098 { SCE_PAS_COMMENT2, "comment2", FALSE },
1099 { SCE_PAS_COMMENTLINE, "commentline", FALSE },
1100 { SCE_PAS_PREPROCESSOR, "preprocessor", FALSE },
1101 { SCE_PAS_PREPROCESSOR2, "preprocessor2", FALSE },
1102 { SCE_PAS_NUMBER, "number", FALSE },
1103 { SCE_PAS_HEXNUMBER, "hexnumber", FALSE },
1104 { SCE_PAS_WORD, "word", FALSE },
1105 { SCE_PAS_STRING, "string", FALSE },
1106 { SCE_PAS_STRINGEOL, "stringeol", FALSE },
1107 { SCE_PAS_CHARACTER, "character", FALSE },
1108 { SCE_PAS_OPERATOR, "operator", FALSE },
1109 { SCE_PAS_ASM, "asm", FALSE }
1111 static const HLKeyword highlighting_keywords_PASCAL[] =
1113 { 0, "primary", FALSE }
1115 #define highlighting_properties_PASCAL EMPTY_PROPERTIES
1118 /* Perl */
1119 #define highlighting_lexer_PERL SCLEX_PERL
1120 static const HLStyle highlighting_styles_PERL[] =
1122 { SCE_PL_DEFAULT, "default", FALSE },
1123 { SCE_PL_ERROR, "error", FALSE },
1124 { SCE_PL_COMMENTLINE, "commentline", FALSE },
1125 { SCE_PL_NUMBER, "number", FALSE },
1126 { SCE_PL_WORD, "word", FALSE },
1127 { SCE_PL_STRING, "string", FALSE },
1128 { SCE_PL_CHARACTER, "character", FALSE },
1129 { SCE_PL_PREPROCESSOR, "preprocessor", FALSE },
1130 { SCE_PL_OPERATOR, "operator", FALSE },
1131 { SCE_PL_IDENTIFIER, "identifier", FALSE },
1132 { SCE_PL_SCALAR, "scalar", FALSE },
1133 { SCE_PL_POD, "pod", FALSE },
1134 { SCE_PL_REGEX, "regex", FALSE },
1135 { SCE_PL_ARRAY, "array", FALSE },
1136 { SCE_PL_HASH, "hash", FALSE },
1137 { SCE_PL_SYMBOLTABLE, "symboltable", FALSE },
1138 { SCE_PL_BACKTICKS, "backticks", FALSE },
1139 { SCE_PL_POD_VERB, "pod_verbatim", FALSE },
1140 { SCE_PL_REGSUBST, "reg_subst", FALSE },
1141 { SCE_PL_DATASECTION, "datasection", FALSE },
1142 { SCE_PL_HERE_DELIM, "here_delim", FALSE },
1143 { SCE_PL_HERE_Q, "here_q", FALSE },
1144 { SCE_PL_HERE_QQ, "here_qq", FALSE },
1145 { SCE_PL_HERE_QX, "here_qx", FALSE },
1146 { SCE_PL_STRING_Q, "string_q", FALSE },
1147 { SCE_PL_STRING_QQ, "string_qq", FALSE },
1148 { SCE_PL_STRING_QX, "string_qx", FALSE },
1149 { SCE_PL_STRING_QR, "string_qr", FALSE },
1150 { SCE_PL_STRING_QW, "string_qw", FALSE },
1151 { SCE_PL_VARIABLE_INDEXER, "variable_indexer", FALSE },
1152 { SCE_PL_PUNCTUATION, "punctuation", FALSE },
1153 { SCE_PL_LONGQUOTE, "longquote", FALSE },
1154 { SCE_PL_SUB_PROTOTYPE, "sub_prototype", FALSE },
1155 { SCE_PL_FORMAT_IDENT, "format_ident", FALSE },
1156 { SCE_PL_FORMAT, "format", FALSE },
1157 { SCE_PL_STRING_VAR, "string_var", FALSE },
1158 { SCE_PL_XLAT, "xlat", FALSE },
1159 { SCE_PL_REGEX_VAR, "regex_var", FALSE },
1160 { SCE_PL_REGSUBST_VAR, "regsubst_var", FALSE },
1161 { SCE_PL_BACKTICKS_VAR, "backticks_var", FALSE },
1162 { SCE_PL_HERE_QQ_VAR, "here_qq_var", FALSE },
1163 { SCE_PL_HERE_QX_VAR, "here_qx_var", FALSE },
1164 { SCE_PL_STRING_QQ_VAR, "string_qq_var", FALSE },
1165 { SCE_PL_STRING_QX_VAR, "string_qx_var", FALSE },
1166 { SCE_PL_STRING_QR_VAR, "string_qr_var", FALSE }
1168 static const HLKeyword highlighting_keywords_PERL[] =
1170 { 0, "primary", FALSE }
1172 #define highlighting_properties_PERL EMPTY_PROPERTIES
1175 /* PHP */
1176 #define highlighting_lexer_PHP SCLEX_HTML
1177 #define highlighting_styles_PHP highlighting_styles_HTML
1178 #define highlighting_keywords_PHP highlighting_keywords_HTML
1179 #define highlighting_properties_PHP highlighting_properties_HTML
1182 /* PO (gettext) */
1183 #define highlighting_lexer_PO SCLEX_PO
1184 static const HLStyle highlighting_styles_PO[] =
1186 { SCE_PO_DEFAULT, "default", FALSE },
1187 { SCE_PO_COMMENT, "comment", FALSE },
1188 { SCE_PO_PROGRAMMER_COMMENT, "programmer_comment", FALSE },
1189 { SCE_PO_REFERENCE, "reference", FALSE },
1190 { SCE_PO_FLAGS, "flags", FALSE },
1191 { SCE_PO_FUZZY, "fuzzy", FALSE },
1192 { SCE_PO_MSGID, "msgid", FALSE },
1193 { SCE_PO_MSGID_TEXT, "msgid_text", FALSE },
1194 { SCE_PO_MSGID_TEXT_EOL, "msgid_text_eol", FALSE },
1195 { SCE_PO_MSGSTR, "msgstr", FALSE },
1196 { SCE_PO_MSGSTR_TEXT, "msgstr_text", FALSE },
1197 { SCE_PO_MSGSTR_TEXT_EOL, "msgstr_text_eol", FALSE },
1198 { SCE_PO_MSGCTXT, "msgctxt", FALSE },
1199 { SCE_PO_MSGCTXT_TEXT, "msgctxt_text", FALSE },
1200 { SCE_PO_MSGCTXT_TEXT_EOL, "msgctxt_text_eol", FALSE },
1201 { SCE_PO_ERROR, "error", FALSE }
1203 #define highlighting_keywords_PO EMPTY_KEYWORDS
1204 #define highlighting_properties_PO EMPTY_PROPERTIES
1207 /* PowerShell */
1208 #define highlighting_lexer_POWERSHELL SCLEX_POWERSHELL
1209 static const HLStyle highlighting_styles_POWERSHELL[] =
1211 { SCE_POWERSHELL_DEFAULT, "default", FALSE },
1212 { SCE_POWERSHELL_COMMENT, "comment", FALSE },
1213 { SCE_POWERSHELL_STRING, "string", FALSE },
1214 { SCE_POWERSHELL_CHARACTER, "character", FALSE },
1215 { SCE_POWERSHELL_NUMBER, "number", FALSE },
1216 { SCE_POWERSHELL_VARIABLE, "variable", FALSE },
1217 { SCE_POWERSHELL_OPERATOR, "operator", FALSE },
1218 { SCE_POWERSHELL_IDENTIFIER, "identifier", FALSE },
1219 { SCE_POWERSHELL_KEYWORD, "keyword", FALSE },
1220 { SCE_POWERSHELL_CMDLET, "cmdlet", FALSE },
1221 { SCE_POWERSHELL_ALIAS, "alias", FALSE },
1222 { SCE_POWERSHELL_FUNCTION, "function", FALSE },
1223 { SCE_POWERSHELL_USER1, "user1", FALSE },
1224 { SCE_POWERSHELL_COMMENTSTREAM, "commentstream", FALSE },
1225 { SCE_POWERSHELL_HERE_STRING, "here_string", FALSE },
1226 { SCE_POWERSHELL_HERE_CHARACTER, "here_character", FALSE },
1227 { SCE_POWERSHELL_COMMENTDOCKEYWORD, "commentdockeyword", FALSE },
1229 static const HLKeyword highlighting_keywords_POWERSHELL[] =
1231 { 0, "keywords", FALSE },
1232 { 1, "cmdlets", FALSE },
1233 { 2, "aliases", FALSE },
1234 { 3, "functions", FALSE },
1235 { 4, "user1", FALSE },
1236 { 5, "docComment", FALSE },
1238 #define highlighting_properties_POWERSHELL EMPTY_PROPERTIES
1241 /* Python */
1242 #define highlighting_lexer_PYTHON SCLEX_PYTHON
1243 static const HLStyle highlighting_styles_PYTHON[] =
1245 { SCE_P_DEFAULT, "default", FALSE },
1246 { SCE_P_COMMENTLINE, "commentline", FALSE },
1247 { SCE_P_NUMBER, "number", FALSE },
1248 { SCE_P_STRING, "string", FALSE },
1249 { SCE_P_CHARACTER, "character", FALSE },
1250 { SCE_P_WORD, "word", FALSE },
1251 { SCE_P_TRIPLE, "triple", FALSE },
1252 { SCE_P_TRIPLEDOUBLE, "tripledouble", FALSE },
1253 { SCE_P_CLASSNAME, "classname", FALSE },
1254 { SCE_P_DEFNAME, "defname", FALSE },
1255 { SCE_P_OPERATOR, "operator", FALSE },
1256 { SCE_P_IDENTIFIER, "identifier", FALSE },
1257 { SCE_P_COMMENTBLOCK, "commentblock", FALSE },
1258 { SCE_P_STRINGEOL, "stringeol", FALSE },
1259 { SCE_P_WORD2, "word2", FALSE },
1260 { SCE_P_DECORATOR, "decorator", FALSE }
1262 static const HLKeyword highlighting_keywords_PYTHON[] =
1264 { 0, "primary", FALSE },
1265 { 1, "identifiers", FALSE }
1267 #define highlighting_properties_PYTHON EMPTY_PROPERTIES
1270 /* R */
1271 #define highlighting_lexer_R SCLEX_R
1272 static const HLStyle highlighting_styles_R[] =
1274 { SCE_R_DEFAULT, "default", FALSE },
1275 { SCE_R_COMMENT, "comment", FALSE },
1276 { SCE_R_KWORD, "kword", FALSE },
1277 { SCE_R_OPERATOR, "operator", FALSE },
1278 { SCE_R_BASEKWORD, "basekword", FALSE },
1279 { SCE_R_OTHERKWORD, "otherkword", FALSE },
1280 { SCE_R_NUMBER, "number", FALSE },
1281 { SCE_R_STRING, "string", FALSE },
1282 { SCE_R_STRING2, "string2", FALSE },
1283 { SCE_R_IDENTIFIER, "identifier", FALSE },
1284 { SCE_R_INFIX, "infix", FALSE },
1285 { SCE_R_INFIXEOL, "infixeol", FALSE }
1287 static const HLKeyword highlighting_keywords_R[] =
1289 { 0, "primary", FALSE },
1290 { 1, "package", FALSE },
1291 { 2, "package_other", FALSE }
1293 #define highlighting_properties_R EMPTY_PROPERTIES
1296 /* Ruby */
1297 #define highlighting_lexer_RUBY SCLEX_RUBY
1298 static const HLStyle highlighting_styles_RUBY[] =
1300 { SCE_RB_DEFAULT, "default", FALSE },
1301 { SCE_RB_COMMENTLINE, "commentline", FALSE },
1302 { SCE_RB_NUMBER, "number", FALSE },
1303 { SCE_RB_STRING, "string", FALSE },
1304 { SCE_RB_CHARACTER, "character", FALSE },
1305 { SCE_RB_WORD, "word", FALSE },
1306 { SCE_RB_GLOBAL, "global", FALSE },
1307 { SCE_RB_SYMBOL, "symbol", FALSE },
1308 { SCE_RB_CLASSNAME, "classname", FALSE },
1309 { SCE_RB_DEFNAME, "defname", FALSE },
1310 { SCE_RB_OPERATOR, "operator", FALSE },
1311 { SCE_RB_IDENTIFIER, "identifier", FALSE },
1312 { SCE_RB_MODULE_NAME, "modulename", FALSE },
1313 { SCE_RB_BACKTICKS, "backticks", FALSE },
1314 { SCE_RB_INSTANCE_VAR, "instancevar", FALSE },
1315 { SCE_RB_CLASS_VAR, "classvar", FALSE },
1316 { SCE_RB_DATASECTION, "datasection", FALSE },
1317 { SCE_RB_HERE_DELIM, "heredelim", FALSE },
1318 { SCE_RB_WORD_DEMOTED, "worddemoted", FALSE },
1319 { SCE_RB_STDIN, "stdin", FALSE },
1320 { SCE_RB_STDOUT, "stdout", FALSE },
1321 { SCE_RB_STDERR, "stderr", FALSE },
1322 { SCE_RB_REGEX, "regex", FALSE },
1323 { SCE_RB_HERE_Q, "here_q", FALSE },
1324 { SCE_RB_HERE_QQ, "here_qq", FALSE },
1325 { SCE_RB_HERE_QX, "here_qx", FALSE },
1326 { SCE_RB_STRING_Q, "string_q", FALSE },
1327 { SCE_RB_STRING_QQ, "string_qq", FALSE },
1328 { SCE_RB_STRING_QX, "string_qx", FALSE },
1329 { SCE_RB_STRING_QR, "string_qr", FALSE },
1330 { SCE_RB_STRING_QW, "string_qw", FALSE },
1331 { SCE_RB_UPPER_BOUND, "upper_bound", FALSE },
1332 { SCE_RB_ERROR, "error", FALSE },
1333 { SCE_RB_POD, "pod", FALSE }
1335 static const HLKeyword highlighting_keywords_RUBY[] =
1337 { 0, "primary", FALSE }
1339 #define highlighting_properties_RUBY EMPTY_PROPERTIES
1341 /* Rust */
1342 #define highlighting_lexer_RUST SCLEX_RUST
1343 static const HLStyle highlighting_styles_RUST[] =
1345 { SCE_RUST_DEFAULT, "default", FALSE },
1346 { SCE_RUST_COMMENTBLOCK, "commentblock", FALSE },
1347 { SCE_RUST_COMMENTLINE, "commentline", FALSE },
1348 { SCE_RUST_COMMENTBLOCKDOC, "commentblockdoc", FALSE },
1349 { SCE_RUST_COMMENTLINEDOC, "commentlinedoc", FALSE },
1350 { SCE_RUST_NUMBER, "number", FALSE },
1351 { SCE_RUST_WORD, "word", FALSE },
1352 { SCE_RUST_WORD2, "word2", FALSE },
1353 { SCE_RUST_WORD3, "word3", FALSE },
1354 { SCE_RUST_WORD4, "word4", FALSE },
1355 { SCE_RUST_WORD5, "word5", FALSE },
1356 { SCE_RUST_WORD6, "word6", FALSE },
1357 { SCE_RUST_WORD7, "word7", FALSE },
1358 { SCE_RUST_STRING, "string", FALSE },
1359 { SCE_RUST_STRINGR, "stringraw", FALSE },
1360 { SCE_RUST_CHARACTER, "character", FALSE },
1361 { SCE_RUST_OPERATOR, "operator", FALSE },
1362 { SCE_RUST_IDENTIFIER, "identifier", FALSE },
1363 { SCE_RUST_LIFETIME, "lifetime", FALSE },
1364 { SCE_RUST_MACRO, "macro", FALSE },
1365 { SCE_RUST_LEXERROR, "lexerror", FALSE },
1366 { SCE_RUST_BYTESTRING, "bytestring", FALSE },
1367 { SCE_RUST_BYTESTRINGR, "bytestringr", FALSE },
1368 { SCE_RUST_BYTECHARACTER, "bytecharacter", FALSE }
1370 static const HLKeyword highlighting_keywords_RUST[] =
1372 { 0, "primary", FALSE },
1373 /* SCI_SETKEYWORDS = 1 - secondary + global tags file types */
1374 { 1, "secondary", TRUE },
1375 { 2, "tertiary", FALSE },
1376 /* SCI_SETKEYWORDS = 3 is for current session types - see document_highlight_tags() */
1378 #define highlighting_properties_RUST EMPTY_PROPERTIES
1380 /* SH */
1381 #define highlighting_lexer_SH SCLEX_BASH
1382 static const HLStyle highlighting_styles_SH[] =
1384 { SCE_SH_DEFAULT, "default", FALSE },
1385 { SCE_SH_COMMENTLINE, "commentline", FALSE },
1386 { SCE_SH_NUMBER, "number", FALSE },
1387 { SCE_SH_WORD, "word", FALSE },
1388 { SCE_SH_STRING, "string", FALSE },
1389 { SCE_SH_CHARACTER, "character", FALSE },
1390 { SCE_SH_OPERATOR, "operator", FALSE },
1391 { SCE_SH_IDENTIFIER, "identifier", FALSE },
1392 { SCE_SH_BACKTICKS, "backticks", FALSE },
1393 { SCE_SH_PARAM, "param", FALSE },
1394 { SCE_SH_SCALAR, "scalar", FALSE },
1395 { SCE_SH_ERROR, "error", FALSE },
1396 { SCE_SH_HERE_DELIM, "here_delim", FALSE },
1397 { SCE_SH_HERE_Q, "here_q", FALSE }
1399 static const HLKeyword highlighting_keywords_SH[] =
1401 { 0, "primary", FALSE }
1403 #define highlighting_properties_SH EMPTY_PROPERTIES
1406 /* SQL */
1407 #define highlighting_lexer_SQL SCLEX_SQL
1408 static const HLStyle highlighting_styles_SQL[] =
1410 { SCE_SQL_DEFAULT, "default", FALSE },
1411 { SCE_SQL_COMMENT, "comment", FALSE },
1412 { SCE_SQL_COMMENTLINE, "commentline", FALSE },
1413 { SCE_SQL_COMMENTDOC, "commentdoc", FALSE },
1414 { SCE_SQL_COMMENTLINEDOC, "commentlinedoc", FALSE },
1415 { SCE_SQL_COMMENTDOCKEYWORD, "commentdockeyword", FALSE },
1416 { SCE_SQL_COMMENTDOCKEYWORDERROR, "commentdockeyworderror", FALSE },
1417 { SCE_SQL_NUMBER, "number", FALSE },
1418 { SCE_SQL_WORD, "word", FALSE },
1419 { SCE_SQL_WORD2, "word2", FALSE },
1420 { SCE_SQL_STRING, "string", FALSE },
1421 { SCE_SQL_CHARACTER, "character", FALSE },
1422 { SCE_SQL_OPERATOR, "operator", FALSE },
1423 { SCE_SQL_IDENTIFIER, "identifier", FALSE },
1424 { SCE_SQL_SQLPLUS, "sqlplus", FALSE },
1425 { SCE_SQL_SQLPLUS_PROMPT, "sqlplus_prompt", FALSE },
1426 { SCE_SQL_SQLPLUS_COMMENT, "sqlplus_comment", FALSE },
1427 { SCE_SQL_QUOTEDIDENTIFIER, "quotedidentifier", FALSE },
1428 { SCE_SQL_QOPERATOR, "qoperator", FALSE }
1429 /* these are for user-defined keywords we don't set yet */
1430 /*{ SCE_SQL_USER1, "user1", FALSE },
1431 { SCE_SQL_USER2, "user2", FALSE },
1432 { SCE_SQL_USER3, "user3", FALSE },
1433 { SCE_SQL_USER4, "user4", FALSE }*/
1435 static const HLKeyword highlighting_keywords_SQL[] =
1437 { 0, "keywords", FALSE }
1439 #define highlighting_properties_SQL EMPTY_PROPERTIES
1442 /* TCL */
1443 #define highlighting_lexer_TCL SCLEX_TCL
1444 static const HLStyle highlighting_styles_TCL[] =
1446 { SCE_TCL_DEFAULT, "default", FALSE },
1447 { SCE_TCL_COMMENT, "comment", FALSE },
1448 { SCE_TCL_COMMENTLINE, "commentline", FALSE },
1449 { SCE_TCL_NUMBER, "number", FALSE },
1450 { SCE_TCL_OPERATOR, "operator", FALSE },
1451 { SCE_TCL_IDENTIFIER, "identifier", FALSE },
1452 { SCE_TCL_WORD_IN_QUOTE, "wordinquote", FALSE },
1453 { SCE_TCL_IN_QUOTE, "inquote", FALSE },
1454 { SCE_TCL_SUBSTITUTION, "substitution", FALSE },
1455 { SCE_TCL_MODIFIER, "modifier", FALSE },
1456 { SCE_TCL_EXPAND, "expand", FALSE },
1457 { SCE_TCL_WORD, "wordtcl", FALSE },
1458 { SCE_TCL_WORD2, "wordtk", FALSE },
1459 { SCE_TCL_WORD3, "worditcl", FALSE },
1460 { SCE_TCL_WORD4, "wordtkcmds", FALSE },
1461 { SCE_TCL_WORD5, "wordexpand", FALSE },
1462 { SCE_TCL_COMMENT_BOX, "commentbox", FALSE },
1463 { SCE_TCL_BLOCK_COMMENT, "blockcomment", FALSE },
1464 { SCE_TCL_SUB_BRACE, "subbrace", FALSE }
1465 /* these are for user-defined keywords we don't set yet */
1466 /*{ SCE_TCL_WORD6, "user2", FALSE },
1467 { SCE_TCL_WORD7, "user3", FALSE },
1468 { SCE_TCL_WORD8, "user4", FALSE }*/
1470 static const HLKeyword highlighting_keywords_TCL[] =
1472 { 0, "tcl", FALSE },
1473 { 1, "tk", FALSE },
1474 { 2, "itcl", FALSE },
1475 { 3, "tkcommands", FALSE },
1476 { 4, "expand", FALSE }
1478 #define highlighting_properties_TCL EMPTY_PROPERTIES
1481 /* Txt2Tags */
1482 #define highlighting_lexer_TXT2TAGS SCLEX_TXT2TAGS
1483 static const HLStyle highlighting_styles_TXT2TAGS[] =
1485 { SCE_TXT2TAGS_DEFAULT, "default", FALSE },
1486 { SCE_TXT2TAGS_LINE_BEGIN, "default", FALSE }, /* XIFME: remappings should be avoided */
1487 { SCE_TXT2TAGS_PRECHAR, "default", FALSE },
1488 { SCE_TXT2TAGS_STRONG1, "strong", FALSE },
1489 { SCE_TXT2TAGS_STRONG2, "strong", FALSE },
1490 { SCE_TXT2TAGS_EM1, "emphasis", FALSE },
1491 { SCE_TXT2TAGS_EM2, "underlined", FALSE }, /* WTF? */
1492 { SCE_TXT2TAGS_HEADER1, "header1", FALSE },
1493 { SCE_TXT2TAGS_HEADER2, "header2", FALSE },
1494 { SCE_TXT2TAGS_HEADER3, "header3", FALSE },
1495 { SCE_TXT2TAGS_HEADER4, "header4", FALSE },
1496 { SCE_TXT2TAGS_HEADER5, "header5", FALSE },
1497 { SCE_TXT2TAGS_HEADER6, "header6", FALSE },
1498 { SCE_TXT2TAGS_ULIST_ITEM, "ulist_item", FALSE },
1499 { SCE_TXT2TAGS_OLIST_ITEM, "olist_item", FALSE },
1500 { SCE_TXT2TAGS_BLOCKQUOTE, "blockquote", FALSE },
1501 { SCE_TXT2TAGS_STRIKEOUT, "strikeout", FALSE },
1502 { SCE_TXT2TAGS_HRULE, "hrule", FALSE },
1503 { SCE_TXT2TAGS_LINK, "link", FALSE },
1504 { SCE_TXT2TAGS_CODE, "code", FALSE },
1505 { SCE_TXT2TAGS_CODE2, "code", FALSE },
1506 { SCE_TXT2TAGS_CODEBK, "codebk", FALSE },
1507 { SCE_TXT2TAGS_COMMENT, "comment", FALSE },
1508 { SCE_TXT2TAGS_OPTION, "option", FALSE },
1509 { SCE_TXT2TAGS_PREPROC, "preproc", FALSE },
1510 { SCE_TXT2TAGS_POSTPROC, "postproc", FALSE }
1512 #define highlighting_keywords_TXT2TAGS EMPTY_KEYWORDS
1513 #define highlighting_properties_TXT2TAGS EMPTY_PROPERTIES
1516 /* VHDL */
1517 #define highlighting_lexer_VHDL SCLEX_VHDL
1518 static const HLStyle highlighting_styles_VHDL[] =
1520 { SCE_VHDL_DEFAULT, "default", FALSE },
1521 { SCE_VHDL_COMMENT, "comment", FALSE },
1522 { SCE_VHDL_COMMENTLINEBANG, "comment_line_bang", FALSE },
1523 { SCE_VHDL_BLOCK_COMMENT, "block_comment", FALSE },
1524 { SCE_VHDL_NUMBER, "number", FALSE },
1525 { SCE_VHDL_STRING, "string", FALSE },
1526 { SCE_VHDL_OPERATOR, "operator", FALSE },
1527 { SCE_VHDL_IDENTIFIER, "identifier", FALSE },
1528 { SCE_VHDL_STRINGEOL, "stringeol", FALSE },
1529 { SCE_VHDL_KEYWORD, "keyword", FALSE },
1530 { SCE_VHDL_STDOPERATOR, "stdoperator", FALSE },
1531 { SCE_VHDL_ATTRIBUTE, "attribute", FALSE },
1532 { SCE_VHDL_STDFUNCTION, "stdfunction", FALSE },
1533 { SCE_VHDL_STDPACKAGE, "stdpackage", FALSE },
1534 { SCE_VHDL_STDTYPE, "stdtype", FALSE },
1535 { SCE_VHDL_USERWORD, "userword", FALSE }
1537 static const HLKeyword highlighting_keywords_VHDL[] =
1539 { 0, "keywords", FALSE },
1540 { 1, "operators", FALSE },
1541 { 2, "attributes", FALSE },
1542 { 3, "std_functions", FALSE },
1543 { 4, "std_packages", FALSE },
1544 { 5, "std_types", FALSE },
1545 { 6, "userwords", FALSE },
1547 #define highlighting_properties_VHDL EMPTY_PROPERTIES
1550 /* Verilog */
1551 #define highlighting_lexer_VERILOG SCLEX_VERILOG
1552 static const HLStyle highlighting_styles_VERILOG[] =
1554 { SCE_V_DEFAULT, "default", FALSE },
1555 { SCE_V_COMMENT, "comment", FALSE },
1556 { SCE_V_COMMENTLINE, "comment_line", FALSE },
1557 { SCE_V_COMMENTLINEBANG, "comment_line_bang", FALSE },
1558 { SCE_V_NUMBER, "number", FALSE },
1559 { SCE_V_WORD, "word", FALSE },
1560 { SCE_V_STRING, "string", FALSE },
1561 { SCE_V_WORD2, "word2", FALSE },
1562 { SCE_V_WORD3, "word3", FALSE },
1563 { SCE_V_PREPROCESSOR, "preprocessor", FALSE },
1564 { SCE_V_OPERATOR, "operator", FALSE },
1565 { SCE_V_IDENTIFIER, "identifier", FALSE },
1566 { SCE_V_STRINGEOL, "stringeol", FALSE },
1567 { SCE_V_USER, "userword", FALSE },
1568 { SCE_V_COMMENT_WORD, "comment_word", FALSE },
1569 { SCE_V_INPUT, "input", FALSE },
1570 { SCE_V_OUTPUT, "output", FALSE },
1571 { SCE_V_INOUT, "inout", FALSE },
1572 { SCE_V_PORT_CONNECT, "port_connect", FALSE }
1574 static const HLKeyword highlighting_keywords_VERILOG[] =
1576 { 0, "word", FALSE },
1577 { 1, "word2", FALSE },
1578 { 2, "word3", FALSE },
1579 { 4, "docComment", FALSE }
1581 #define highlighting_properties_VERILOG EMPTY_PROPERTIES
1584 /* XML */
1585 #define highlighting_lexer_XML SCLEX_XML
1586 #define highlighting_styles_XML highlighting_styles_HTML
1587 static const HLKeyword highlighting_keywords_XML[] =
1589 { 5, "sgml", FALSE }
1591 #define highlighting_properties_XML highlighting_properties_HTML
1594 /* YAML */
1595 #define highlighting_lexer_YAML SCLEX_YAML
1596 static const HLStyle highlighting_styles_YAML[] =
1598 { SCE_YAML_DEFAULT, "default", FALSE },
1599 { SCE_YAML_COMMENT, "comment", FALSE },
1600 { SCE_YAML_IDENTIFIER, "identifier", FALSE },
1601 { SCE_YAML_KEYWORD, "keyword", FALSE },
1602 { SCE_YAML_NUMBER, "number", FALSE },
1603 { SCE_YAML_REFERENCE, "reference", FALSE },
1604 { SCE_YAML_DOCUMENT, "document", FALSE },
1605 { SCE_YAML_TEXT, "text", FALSE },
1606 { SCE_YAML_ERROR, "error", FALSE },
1607 { SCE_YAML_OPERATOR, "operator", FALSE }
1609 static const HLKeyword highlighting_keywords_YAML[] =
1611 { 0, "keywords", FALSE }
1613 #define highlighting_properties_YAML EMPTY_PROPERTIES
1616 /* Zephir */
1617 #define highlighting_lexer_ZEPHIR SCLEX_PHPSCRIPT
1618 #define highlighting_styles_ZEPHIR highlighting_styles_PHP
1619 #define highlighting_keywords_ZEPHIR highlighting_keywords_PHP
1620 #define highlighting_properties_ZEPHIR highlighting_properties_PHP
1622 G_END_DECLS
1624 #endif /* GEANY_HIGHLIGHTING_MAPPINGS_H */