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