diff --git a/data/filedefs/filetypes.c b/data/filedefs/filetypes.c index 3f6d3d146e..143eb53913 100644 --- a/data/filedefs/filetypes.c +++ b/data/filedefs/filetypes.c @@ -18,11 +18,14 @@ uuid=other preprocessor=preprocessor operator=operator identifier=identifier_1 +#identifier.1=keyword_3 +#identifier.2=keyword_4 stringeol=string_eol verbatim=string_2 regex=regex commentlinedoc=comment_line_doc commentdockeyword=comment_doc_keyword +#commentdockeyword.1=comment_doc_keyword,bold commentdockeyworderror=comment_doc_keyword_error globalclass=class # """verbatim""" @@ -37,6 +40,9 @@ primary=asm auto break case char const continue default do double else enum exte secondary= # these are the Doxygen keywords docComment=a addindex addtogroup anchor arg attention author authors b brief bug c callergraph callgraph category cite class code cond copybrief copydetails copydoc copyright date def defgroup deprecated details dir dontinclude dot dotfile e else elseif em endcode endcond enddot endhtmlonly endif endinternal endlatexonly endlink endmanonly endmsc endrtfonly endverbatim endxmlonly enum example exception extends file fn headerfile hideinitializer htmlinclude htmlonly if ifnot image implements include includelineno ingroup interface internal invariant latexonly li line link mainpage manonly memberof msc mscfile n name namespace nosubgrouping note overload p package page par paragraph param post pre private privatesection property protected protectedsection protocol public publicsection ref related relatedalso relates relatesalso remark remarks result return returns retval rtfonly sa section see short showinitializer since skip skipline snippet struct subpage subsection subsubsection tableofcontents test throw throws todo tparam typedef union until var verbatim verbinclude version warning weakgroup xmlonly xrefitem +#identifier.1= +#identifier.2= +#commentdockeyword.1= [lexer_properties] styling.within.preprocessor=1 diff --git a/data/filedefs/filetypes.gdscript b/data/filedefs/filetypes.gdscript index 295cba6cdb..031008e2c4 100644 --- a/data/filedefs/filetypes.gdscript +++ b/data/filedefs/filetypes.gdscript @@ -13,6 +13,8 @@ classname=type defname=function operator=operator identifier=identifier_1 +#identifier.1=keyword_3 +#identifier.2=keyword_4 commentblock=comment stringeol=string_eol word2=keyword_2 @@ -26,6 +28,8 @@ primary=and in not or as breakpoint class class_name extends is func signal cons # additional keywords, will be highlighted with style "word2" # Using GDScript 2 keyword classification identifiers=PI TAU INF NAN Color8 ColorN abs acos asin assert atan atan2 await bytes2var ceil char clamp convert cos cosh db2linear decimals dectime deg2rad dict2inst ease exp floor fmod fposmod funcref hash inst2dict instance_from_id is_inf is_nan lerp linear2db load log max min nearest_po2 pow preload print print_stack printerr printraw prints printt rad2deg rand_range rand_seed randf randi randomize range round seed sign sin sinh sqrt stepify str str2var tan tan tanh type_exist typeof var2bytes var2str weakref set get self remote master puppet remotesync mastersync puppetsync icon export onready tool export_enum export_file export_dir export_global_file export_global_dir export_multiline export_placeholder export_range export_exp_easing export_color_no_alpha export_node_path export_flags export_flags_2d_render export_flags_2d_physics export_flags_2d_navigation export_flags_3d_render export_flags_3d_physics export_flags_3d_navigation rpc +#identifier.1= +#identifier.2= [lexer_properties] fold.gdscript.quotes=1 diff --git a/data/filedefs/filetypes.python.in b/data/filedefs/filetypes.python.in index e07558c841..b148d04f22 100644 --- a/data/filedefs/filetypes.python.in +++ b/data/filedefs/filetypes.python.in @@ -13,6 +13,8 @@ classname=type defname=function operator=operator identifier=identifier_1 +#identifier.1=keyword_3 +#identifier.2=keyword_4 commentblock=comment stringeol=string_eol word2=keyword_2 @@ -31,6 +33,9 @@ primary=False None True _ and as assert async await break case class continue de # additional keywords, will be highlighted with style "word2" # Python 3 builtins (minus ones in primary) identifiers=ArithmeticError AssertionError AttributeError BaseException BlockingIOError BrokenPipeError BufferError BytesWarning ChildProcessError ConnectionAbortedError ConnectionError ConnectionRefusedError ConnectionResetError DeprecationWarning EOFError Ellipsis EncodingWarning EnvironmentError Exception FileExistsError FileNotFoundError FloatingPointError FutureWarning GeneratorExit IOError ImportError ImportWarning IndentationError IndexError InterruptedError IsADirectoryError KeyError KeyboardInterrupt LookupError MemoryError ModuleNotFoundError NameError NotADirectoryError NotImplemented NotImplementedError OSError OverflowError PendingDeprecationWarning PermissionError ProcessLookupError RecursionError ReferenceError ResourceWarning RuntimeError RuntimeWarning StopAsyncIteration StopIteration SyntaxError SyntaxWarning SystemError SystemExit TabError TimeoutError TypeError UnboundLocalError UnicodeDecodeError UnicodeEncodeError UnicodeError UnicodeTranslateError UnicodeWarning UserWarning ValueError Warning ZeroDivisionError __build_class__ __debug__ __doc__ __import__ __loader__ __name__ __package__ __spec__ abs aiter all anext any ascii bin bool breakpoint bytearray bytes callable chr classmethod compile complex copyright credits delattr dict dir divmod enumerate eval exec exit filter float format frozenset getattr globals hasattr hash help hex id input int isinstance issubclass iter len license list locals map max memoryview min next object oct open ord pow print property quit range repr reversed round set setattr slice sorted staticmethod str sum super tuple type vars zip +# identifiers for identifier substyles +#identifier.1= +#identifier.2= [lexer_properties] fold.quotes.python=1 diff --git a/data/filedefs/filetypes.sh b/data/filedefs/filetypes.sh index afad219a5f..7d7a9b021c 100644 --- a/data/filedefs/filetypes.sh +++ b/data/filedefs/filetypes.sh @@ -9,15 +9,27 @@ string=string_1 character=character operator=operator identifier=identifier +#identifier.1=keyword_2 +#identifier.2=keyword_3 +#identifier.3=keyword_4 backticks=backticks param=parameter scalar=identifier_1 +#scalar.1=identifier_2 +#scalar.2=identifier_3 +#scalar.3=identifier_4 error=error here_delim=here_doc here_q=here_doc [keywords] primary=break case continue do done elif else esac eval exit export fi for function goto if in integer return set shift then until while +#identifier.1= +#identifier.2= +#identifier.3= +#scalar.1= +#scalar.2= +#scalar.3= [settings] diff --git a/doc/geany.txt b/doc/geany.txt index 9fa6600493..63f1216c1c 100644 --- a/doc/geany.txt +++ b/doc/geany.txt @@ -4251,6 +4251,35 @@ manual format is: * ``key=foreground_color;background_color;bold_flag;italic_flag`` +``key`` +******* + +The ``key`` is the name of a lexical class ("style") valid for the associated +lexer. + +.. _sub-styles: + +Some specific lexical classes can be "sub-classed": in association with an +identically-named key in the `[keywords] section`_, it is possible to define +several variants of that lexical class. Those are in the form ``class.N``, +where ``class`` is the base lexical class name, and ``N`` a plain integer +starting from 1. +These "sub-styles" will be used when the regular lexical class would match the +base class, but that specific instance matches one of the associated keywords, +effectively allowing to have a large and dynamic set of separately-styled +keywords. + +Note that the values of ``N`` must start at 1 for each lexical class, and must +be in 1-increments: e.g. it is not allowed to define ``class.1`` and +``class.3`` omitting ``class.2``. Any such gap will result in the following +sub-classes to be ignored. + +The maximum number of possible sub-styles also depends on the lexer, but it is +usually 64 in total, all lexical classes combined. + +Value +***** + Colors have to be specified as RGB hex values prefixed by 0x or # similar to HTML/CSS hex triplets. For example, all of the following are valid values for pure red; 0xff0000, 0xf00, #ff0000, or #f00. The @@ -4270,7 +4299,7 @@ This makes the key style have red foreground text, default background color text and bold emphasis. Using a named style -******************* ++++++++++++++++++++ The second format uses a *named style* name to reference a style defined in filetypes.common. @@ -4317,10 +4346,12 @@ the filetype. Some filetypes do not support keywords, so adding a new key will not work. You can only add or remove keywords to/from an existing list. +This section also defines keywords for `sub-styles`_ when they have the form +``class.N``. + .. important:: The keywords list must be in one line without line ending characters. - [lexer_properties] section `````````````````````````` Here any special properties for the Scintilla lexer can be set in the diff --git a/src/editor.c b/src/editor.c index 32fb6249f4..5d7fa6c605 100644 --- a/src/editor.c +++ b/src/editor.c @@ -1357,19 +1357,18 @@ static void read_indent(GeanyEditor *editor, gint pos) } -static gint get_brace_indent(ScintillaObject *sci, gint line) +static gint get_brace_indent(GeanyEditor *editor, gint line) { - gint start = sci_get_position_from_line(sci, line); - gint end = sci_get_line_end_position(sci, line) - 1; - gint lexer = sci_get_lexer(sci); + gint start = sci_get_position_from_line(editor->sci, line); + gint end = sci_get_line_end_position(editor->sci, line) - 1; gint count = 0; gint pos; for (pos = end; pos >= start && count < 1; pos--) { - if (highlighting_is_code_style(lexer, sci_get_style_at(sci, pos))) + if (editor_is_code_at(editor, pos)) { - gchar c = sci_get_char_at(sci, pos); + gchar c = sci_get_char_at(editor->sci, pos); if (c == '{') count ++; @@ -1384,17 +1383,14 @@ static gint get_brace_indent(ScintillaObject *sci, gint line) /* gets the last code position on a line * warning: if there is no code position on the line, returns the start position */ -static gint get_sci_line_code_end_position(ScintillaObject *sci, gint line) +static gint get_sci_line_code_end_position(GeanyEditor *editor, gint line) { - gint start = sci_get_position_from_line(sci, line); - gint lexer = sci_get_lexer(sci); + gint start = sci_get_position_from_line(editor->sci, line); gint pos; - for (pos = sci_get_line_end_position(sci, line) - 1; pos > start; pos--) + for (pos = sci_get_line_end_position(editor->sci, line) - 1; pos > start; pos--) { - gint style = sci_get_style_at(sci, pos); - - if (highlighting_is_code_style(lexer, style) && ! isspace(sci_get_char_at(sci, pos))) + if (editor_is_code_at(editor, pos) && ! isspace(sci_get_char_at(editor->sci, pos))) break; } @@ -1402,13 +1398,13 @@ static gint get_sci_line_code_end_position(ScintillaObject *sci, gint line) } -static gint get_python_indent(ScintillaObject *sci, gint line) +static gint get_python_indent(GeanyEditor *editor, gint line) { - gint last_char = get_sci_line_code_end_position(sci, line); + gint last_char = get_sci_line_code_end_position(editor, line); /* add extra indentation for Python after colon */ - if (sci_get_char_at(sci, last_char) == ':' && - sci_get_style_at(sci, last_char) == SCE_P_OPERATOR) + if (sci_get_char_at(editor->sci, last_char) == ':' && + sci_get_base_style_at(editor->sci, last_char) == SCE_P_OPERATOR) { return 1; } @@ -1416,10 +1412,11 @@ static gint get_python_indent(ScintillaObject *sci, gint line) } -static gint get_xml_indent(ScintillaObject *sci, gint line) +static gint get_xml_indent(GeanyEditor *editor, gint line) { + ScintillaObject *const sci = editor->sci; gboolean need_close = FALSE; - gint end = get_sci_line_code_end_position(sci, line); + gint end = get_sci_line_code_end_position(editor, line); gint pos; /* don't indent if there's a closing tag to the right of the cursor */ @@ -1431,7 +1428,7 @@ static gint get_xml_indent(ScintillaObject *sci, gint line) if (sci_get_char_at(sci, end) == '>' && sci_get_char_at(sci, end - 1) != '/') { - gint style = sci_get_style_at(sci, end); + gint style = sci_get_base_style_at(sci, end); if (style == SCE_H_TAG || style == SCE_H_TAGUNKNOWN) { @@ -1469,9 +1466,9 @@ static gint get_indent_size_after_line(GeanyEditor *editor, gint line) gint additional_indent = 0; if (lexer_has_braces(sci)) - additional_indent = iprefs->width * get_brace_indent(sci, line); + additional_indent = iprefs->width * get_brace_indent(editor, line); else if (sci_get_lexer(sci) == SCLEX_PYTHON) /* Python/Cython */ - additional_indent = iprefs->width * get_python_indent(sci, line); + additional_indent = iprefs->width * get_python_indent(editor, line); /* HTML lexer "has braces" because of PHP and JavaScript. If get_brace_indent() did not * recommend us to insert additional indent, we are probably not in PHP/JavaScript chunk and @@ -1481,7 +1478,7 @@ static gint get_indent_size_after_line(GeanyEditor *editor, gint line) sci_get_lexer(sci) == SCLEX_XML) && editor->document->file_type->priv->xml_indent_tags) { - size += iprefs->width * get_xml_indent(sci, line); + size += iprefs->width * get_xml_indent(editor, line); } size += additional_indent; @@ -1993,8 +1990,6 @@ static gchar *find_calltip(const gchar *word, GeanyFiletype *ft) gboolean editor_show_calltip(GeanyEditor *editor, gint pos) { gint orig_pos = pos; /* the position for the calltip */ - gint lexer; - gint style; gchar word[GEANY_MAX_WORD_LENGTH]; gchar *str; ScintillaObject *sci; @@ -2004,23 +1999,20 @@ gboolean editor_show_calltip(GeanyEditor *editor, gint pos) sci = editor->sci; - lexer = sci_get_lexer(sci); - if (pos == -1) { /* position of '(' is unknown, so go backwards from current position to find it */ pos = sci_get_current_position(sci); pos--; orig_pos = pos; - pos = (lexer == SCLEX_LATEX) ? find_previous_brace(sci, pos) : + pos = (sci_get_lexer(sci) == SCLEX_LATEX) ? find_previous_brace(sci, pos) : find_start_bracket(sci, pos); if (pos == -1) return FALSE; } /* the style 1 before the brace (which may be highlighted) */ - style = sci_get_style_at(sci, pos - 1); - if (! highlighting_is_code_style(lexer, style)) + if (! editor_is_code_at(editor, pos - 1)) return FALSE; while (pos > 0 && isspace(sci_get_char_at(sci, pos - 1))) @@ -2212,7 +2204,7 @@ static gboolean autocomplete_doc_word(GeanyEditor *editor, gchar *root, gsize ro gboolean editor_start_auto_complete(GeanyEditor *editor, gint pos, gboolean force) { - gint rootlen, lexer, style; + gint rootlen, style; gchar *root; gchar cword[GEANY_MAX_WORD_LENGTH]; ScintillaObject *sci; @@ -2233,13 +2225,12 @@ gboolean editor_start_auto_complete(GeanyEditor *editor, gint pos, gboolean forc sci = editor->sci; ft = editor->document->file_type; - lexer = sci_get_lexer(sci); - style = sci_get_style_at(sci, pos - 2); - /* don't autocomplete in comments and strings */ - if (!force && !highlighting_is_code_style(lexer, style)) + if (!force && !editor_is_code_at(editor, pos - 2)) return FALSE; + style = sci_get_base_style_at(sci, pos - 2); + ret = autocomplete_check_html(editor, style, pos); if (ft->id == GEANY_FILETYPES_LATEX) @@ -2725,8 +2716,8 @@ static gboolean handle_xml(GeanyEditor *editor, gint pos, gchar ch) return FALSE; /* return if we are inside any embedded script */ - style = sci_get_style_at(sci, pos); - if (style > SCE_H_XCCOMMENT && ! highlighting_is_string_style(lexer, style)) + style = sci_get_base_style_at(sci, pos); + if (style > SCE_H_XCCOMMENT && ! editor_is_string_at(editor, pos)) return FALSE; /* if ch is /, check for document->file_type; line_start = sci_get_position_from_line(editor->sci, line); - style = sci_get_style_at(editor->sci, line_start); + style = sci_get_base_style_at(editor->sci, line_start); /* Handle PHP filetype with embedded HTML */ if (current_ft->id == GEANY_FILETYPES_PHP && ! is_style_php(style)) @@ -2952,7 +2943,7 @@ static gint get_multiline_comment_style(GeanyEditor *editor, gint line_start) case SCLEX_HTML: case SCLEX_PHPSCRIPT: { - if (is_style_php(sci_get_style_at(editor->sci, line_start))) + if (is_style_php(sci_get_base_style_at(editor->sci, line_start))) style_comment = SCE_HPHP_COMMENT; else style_comment = SCE_H_COMMENT; @@ -3070,7 +3061,7 @@ gint editor_do_uncomment(GeanyEditor *editor, gint line, gboolean toggle) /* skip lines which are already comments */ style_comment = get_multiline_comment_style(editor, line_start); - if (sci_get_style_at(editor->sci, line_start + x) == style_comment) + if (sci_get_base_style_at(editor->sci, line_start + x) == style_comment) { if (real_uncomment_multiline(editor)) count = 1; @@ -3192,7 +3183,7 @@ void editor_do_comment_toggle(GeanyEditor *editor) /* skip lines which are already comments */ style_comment = get_multiline_comment_style(editor, line_start); - if (sci_get_style_at(editor->sci, line_start + x) == style_comment) + if (sci_get_base_style_at(editor->sci, line_start + x) == style_comment) { if (real_uncomment_multiline(editor)) count_uncommented++; @@ -3360,7 +3351,7 @@ gint editor_do_comment(GeanyEditor *editor, gint line, gboolean allow_empty_line /* skip lines which are already comments */ style_comment = get_multiline_comment_style(editor, line_start); - if (sci_get_style_at(editor->sci, line_start + x) == style_comment) + if (sci_get_base_style_at(editor->sci, line_start + x) == style_comment) continue; real_comment_multiline(editor, line_start, last_line); @@ -3523,7 +3514,7 @@ static void auto_multiline(GeanyEditor *editor, gint cur_line) /* Use the start of the line enter was pressed on, to avoid any doc keyword styles */ indent_pos = sci_get_line_indent_position(sci, cur_line - 1); style = sci_get_style_at(sci, indent_pos); - if (!in_block_comment(lexer, style)) + if (!in_block_comment(lexer, sci_get_style_from_substyle(sci, style))) return; /* Check whether the comment block continues on this line */ @@ -5351,6 +5342,52 @@ void editor_insert_snippet(GeanyEditor *editor, gint pos, const gchar *snippet) g_string_free(pattern, TRUE); } + +/** Checks whether the given position is inside a string. + * + * @param editor A GeanyEditor instance. + * @param pos Position in the document to check. + * + * @return @c TRUE if the position is inside a string, @c FALSE otherwise. + */ +GEANY_API_SYMBOL +gboolean editor_is_string_at(GeanyEditor *editor, gint pos) +{ + return highlighting_is_string_style(sci_get_lexer(editor->sci), + sci_get_base_style_at(editor->sci, pos)); +} + + +/** Checks whether the given position is inside a comment. + * + * @param editor A GeanyEditor instance. + * @param pos Position in the document to check. + * + * @return @c TRUE if the position is inside a comment, @c FALSE otherwise. + */ +GEANY_API_SYMBOL +gboolean editor_is_comment_at(GeanyEditor *editor, gint pos) +{ + return highlighting_is_comment_style(sci_get_lexer(editor->sci), + sci_get_base_style_at(editor->sci, pos)); +} + + +/** Checks whether the given position is normal code (not string, comment, preprocessor, etc). + * + * @param editor A GeanyEditor instance. + * @param pos Position in the document to check. + * + * @return @c TRUE if the position holds code, @c FALSE otherwise. + */ +GEANY_API_SYMBOL +gboolean editor_is_code_at(GeanyEditor *editor, gint pos) +{ + return highlighting_is_code_style(sci_get_lexer(editor->sci), + sci_get_base_style_at(editor->sci, pos)); +} + + static void *copy_(void *src) { return src; } static void free_(void *doc) { } diff --git a/src/editor.h b/src/editor.h index 4dffe45629..ced142c5b4 100644 --- a/src/editor.h +++ b/src/editor.h @@ -199,6 +199,9 @@ const gchar *editor_find_snippet(GeanyEditor *editor, const gchar *snippet_name) void editor_insert_snippet(GeanyEditor *editor, gint pos, const gchar *snippet); +gboolean editor_is_string_at(GeanyEditor *editor, gint pos); +gboolean editor_is_comment_at(GeanyEditor *editor, gint pos); +gboolean editor_is_code_at(GeanyEditor *editor, gint pos); #ifdef GEANY_PRIVATE diff --git a/src/highlighting.c b/src/highlighting.c index 9cc5bf2b2c..469817d147 100644 --- a/src/highlighting.c +++ b/src/highlighting.c @@ -61,12 +61,23 @@ static gchar *whitespace_chars = NULL; typedef struct { - gsize count; /* number of styles */ - GeanyLexerStyle *styling; /* array of styles, NULL if not used or uninitialised */ - gchar **keywords; - gchar *wordchars; /* NULL used for style sets with no styles */ - gchar **property_keys; - gchar **property_values; + GeanyLexerStyle styling; + struct { + gsize count; + GeanyLexerStyle *styling; + gchar **keywords; + } sub; +} LexerStyle; + + +typedef struct +{ + gsize count; /* number of styles */ + LexerStyle *styles; /* array of styles, NULL if not used or uninitialised */ + gchar **keywords; + gchar *wordchars; /* NULL used for style sets with no styles */ + gchar **property_keys; + gchar **property_values; } StyleSet; /* each filetype has a styleset but GEANY_FILETYPES_NONE uses common_style_set for styling */ @@ -135,7 +146,7 @@ static void new_styleset(guint file_type_id, gsize styling_count) StyleSet *set = &style_sets[file_type_id]; set->count = styling_count; - set->styling = g_new0(GeanyLexerStyle, styling_count); + set->styles = g_malloc0_n(set->count, sizeof *set->styles); } @@ -144,9 +155,14 @@ static void free_styleset(guint file_type_id) StyleSet *style_ptr; style_ptr = &style_sets[file_type_id]; + for (guint i = 0; i < style_ptr->count; i++) + { + g_free(style_ptr->styles[i].sub.styling); + g_strfreev(style_ptr->styles[i].sub.keywords); + } style_ptr->count = 0; - g_free(style_ptr->styling); - style_ptr->styling = NULL; + g_free(style_ptr->styles); + style_ptr->styles = NULL; g_strfreev(style_ptr->keywords); style_ptr->keywords = NULL; g_free(style_ptr->wordchars); @@ -388,6 +404,7 @@ static guint invert(guint icolour) } +/* gets styling for a *base* style (no substyle support) */ static GeanyLexerStyle *get_style(guint ft_id, guint styling_index) { g_assert(ft_id < filetypes_array->len); @@ -402,15 +419,13 @@ static GeanyLexerStyle *get_style(guint ft_id, guint styling_index) StyleSet *set = &style_sets[ft_id]; g_assert(styling_index < set->count); - return &set->styling[styling_index]; + return &set->styles[styling_index].styling; } } -static void set_sci_style(ScintillaObject *sci, guint style, guint ft_id, guint styling_index) +static void set_sci_style_from_lexer_style(ScintillaObject *sci, guint style, const GeanyLexerStyle *style_ptr) { - GeanyLexerStyle *style_ptr = get_style(ft_id, styling_index); - SSM(sci, SCI_STYLESETFORE, style, invert(style_ptr->foreground)); SSM(sci, SCI_STYLESETBACK, style, invert(style_ptr->background)); SSM(sci, SCI_STYLESETBOLD, style, style_ptr->bold); @@ -418,6 +433,12 @@ static void set_sci_style(ScintillaObject *sci, guint style, guint ft_id, guint } +static void set_sci_style(ScintillaObject *sci, guint style, guint ft_id, guint styling_index) +{ + set_sci_style_from_lexer_style(sci, style, get_style(ft_id, styling_index)); +} + + void highlighting_free_styles(void) { guint i; @@ -835,9 +856,50 @@ static void styleset_init_from_mapping(guint ft_id, GKeyFile *config, GKeyFile * new_styleset(ft_id, n_styles); foreach_range(i, n_styles) { - GeanyLexerStyle *style = &style_sets[ft_id].styling[i]; + LexerStyle *style = &style_sets[ft_id].styles[i]; + + get_keyfile_style(config, config_home, styles[i].name, &style->styling); + + /* load sub-styles, if any */ + if (styles[i].sub_stylable) + { + for (guint sub = 1; sub <= 0xff /* styles are 8 bits max */; sub++) + { + gchar *sub_name = g_strdup_printf("%s.%u", styles[i].name, sub); + gboolean has_style = (g_key_file_has_key(config, "styling", sub_name, NULL) || + g_key_file_has_key(config_home, "styling", sub_name, NULL)); + gboolean has_keywords = (g_key_file_has_key(config, "keywords", sub_name, NULL) || + g_key_file_has_key(config_home, "keywords", sub_name, NULL)); + + if (has_style && has_keywords) + { + g_debug("loading sub-style \"%s\"", sub_name); + + style->sub.count++; + /* style */ + style->sub.styling = + g_realloc_n(style->sub.styling, style->sub.count, sizeof *style->sub.styling); + get_keyfile_style(config, config_home, sub_name, &style->sub.styling[style->sub.count - 1]); + /* identifiers */ + style->sub.keywords = + g_realloc_n(style->sub.keywords, style->sub.count + 1, sizeof *style->sub.keywords); + style->sub.keywords[style->sub.count] = NULL; + style->sub.keywords[style->sub.count - 1] = + utils_get_setting(string, config_home, config, "keywords", sub_name, ""); + } + else if (has_style) + g_warning("sub-style \"%s\" is defined, but it has no corresponding keywords", sub_name); + else if (has_keywords) + g_warning("sub-style keywords \"%s\" are defined, but have no corresponding sub-style", sub_name); + else + { + g_free(sub_name); + break; + } - get_keyfile_style(config, config_home, styles[i].name, style); + g_free(sub_name); + } + } } /* keywords */ @@ -877,6 +939,39 @@ static void styleset_from_mapping(ScintillaObject *sci, guint ft_id, guint lexer if (styles[i].fill_eol) SSM(sci, SCI_STYLESETEOLFILLED, styles[i].style, TRUE); set_sci_style(sci, styles[i].style, ft_id, i); + if (styles[i].sub_stylable) + { + LexerStyle *style = &style_sets[ft_id].styles[i]; + + if (style->sub.count) + { + gint sub_first = 0; + gsize allocated_count; + + /* try allocating the substyles, but if allocating them all fails, try allocating + * fewer ones ignoring the rest. */ + for (allocated_count = style->sub.count; allocated_count > 0; allocated_count--) + { + sub_first = SSM(sci, SCI_ALLOCATESUBSTYLES, styles[i].style, allocated_count); + if (sub_first >= 0) + break; + } + if (allocated_count != style->sub.count) + { + g_warning("Requested %lu substyles for style \"%s\" of filetype \"%s\", " + "but could only allocate %lu. Higher substyles will not be " + "available. This is likely due to allocating more substyles " + "in total than the filetype's lexer supports.", + style->sub.count, styles[i].name, filetypes[ft_id]->name, + allocated_count); + } + for (guint sub = 0; sub < allocated_count; sub++) + { + set_sci_style_from_lexer_style(sci, sub_first + sub, &style->sub.styling[sub]); + SSM(sci, SCI_SETIDENTIFIERS, sub_first + sub, (sptr_t) style->sub.keywords[sub]); + } + } + } } } @@ -1397,6 +1492,8 @@ void highlighting_show_color_scheme_dialog(void) * @param style Scintilla style (@c SCE_*). * * @return @c TRUE if the style is a string, @c FALSE otherwise. + * + * @deprecated 2.1 Use editor_is_string_at() */ GEANY_API_SYMBOL gboolean highlighting_is_string_style(gint lexer, gint style) @@ -1658,6 +1755,8 @@ gboolean highlighting_is_string_style(gint lexer, gint style) * @param style Scintilla style (@c SCE_*). * * @return @c TRUE if the style is a comment, @c FALSE otherwise. + * + * @deprecated 2.1 Use editor_is_comment_at() */ GEANY_API_SYMBOL gboolean highlighting_is_comment_style(gint lexer, gint style) @@ -1672,6 +1771,10 @@ gboolean highlighting_is_comment_style(gint lexer, gint style) style == SCE_C_PREPROCESSORCOMMENT || style == SCE_C_PREPROCESSORCOMMENTDOC || style == SCE_C_COMMENTLINEDOC || + /* SCE_C_COMMENTDOCKEYWORD is sub-stylable, but we can't figure + * out the base style if given a sub-style without the + * Scintilla instance. This is a good example as to why this + * is deprecated. */ style == SCE_C_COMMENTDOCKEYWORD || style == SCE_C_COMMENTDOCKEYWORDERROR || style == SCE_C_TASKMARKER); @@ -1888,6 +1991,8 @@ gboolean highlighting_is_comment_style(gint lexer, gint style) * @param style Scintilla style (@c SCE_*). * * @return @c TRUE if the style is code, @c FALSE otherwise. + * + * @deprecated 2.1 Use editor_is_code_at() */ GEANY_API_SYMBOL gboolean highlighting_is_code_style(gint lexer, gint style) diff --git a/src/highlighting.h b/src/highlighting.h index 73079472c1..c84484c5f0 100644 --- a/src/highlighting.h +++ b/src/highlighting.h @@ -22,6 +22,8 @@ #ifndef GEANY_HIGHLIGHTING_H #define GEANY_HIGHLIGHTING_H 1 +#include "geany.h" /* for GEANY_DEPRECATED */ + #include "filetypes.h" #include "gtkcompat.h" /* Needed by ScintillaWidget.h */ @@ -49,9 +51,14 @@ const GeanyLexerStyle *highlighting_get_style(gint ft_id, gint style_id); void highlighting_set_styles(ScintillaObject *sci, GeanyFiletype *ft); -gboolean highlighting_is_string_style(gint lexer, gint style); -gboolean highlighting_is_comment_style(gint lexer, gint style); -gboolean highlighting_is_code_style(gint lexer, gint style); +#ifndef GEANY_DISABLE_DEPRECATED +gboolean highlighting_is_string_style(gint lexer, gint style) + GEANY_DEPRECATED_FOR(editor_is_string_at); +gboolean highlighting_is_comment_style(gint lexer, gint style) + GEANY_DEPRECATED_FOR(editor_is_comment_at); +gboolean highlighting_is_code_style(gint lexer, gint style) + GEANY_DEPRECATED_FOR(editor_is_code_at); +#endif /* GEANY_DISABLE_DEPRECATED */ #ifdef GEANY_PRIVATE diff --git a/src/highlightingmappings.h b/src/highlightingmappings.h index b65aa8390c..e2fbd678e2 100644 --- a/src/highlightingmappings.h +++ b/src/highlightingmappings.h @@ -46,9 +46,10 @@ G_BEGIN_DECLS typedef struct { - guint style; /* SCI style */ - const gchar *name; /* style name in the filetypes.* file */ - gboolean fill_eol; /* whether to set EOLFILLED flag to this style */ + guint style; /* SCI style */ + const gchar *name; /* style name in the filetypes.* file */ + gboolean fill_eol; /* whether to set EOLFILLED flag to this style */ + gboolean sub_stylable; /* Whether substyles can be allocated for this style */ } HLStyle; typedef struct @@ -84,14 +85,14 @@ typedef struct #define highlighting_lexer_ABAQUS SCLEX_ABAQUS static const HLStyle highlighting_styles_ABAQUS[] = { - { SCE_ABAQUS_DEFAULT, "default", FALSE }, - { SCE_ABAQUS_COMMENT, "comment", FALSE }, - { SCE_ABAQUS_NUMBER, "number", FALSE }, - { SCE_ABAQUS_STRING, "string", FALSE }, - { SCE_ABAQUS_OPERATOR, "operator", FALSE }, - { SCE_ABAQUS_PROCESSOR, "processor", FALSE }, - { SCE_ABAQUS_STARCOMMAND, "starcommand", FALSE }, - { SCE_ABAQUS_ARGUMENT, "argument", FALSE } + { SCE_ABAQUS_DEFAULT, "default", FALSE, FALSE }, + { SCE_ABAQUS_COMMENT, "comment", FALSE, FALSE }, + { SCE_ABAQUS_NUMBER, "number", FALSE, FALSE }, + { SCE_ABAQUS_STRING, "string", FALSE, FALSE }, + { SCE_ABAQUS_OPERATOR, "operator", FALSE, FALSE }, + { SCE_ABAQUS_PROCESSOR, "processor", FALSE, FALSE }, + { SCE_ABAQUS_STARCOMMAND, "starcommand", FALSE, FALSE }, + { SCE_ABAQUS_ARGUMENT, "argument", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_ABAQUS[] = { @@ -109,18 +110,18 @@ static const HLKeyword highlighting_keywords_ABAQUS[] = #define highlighting_lexer_ADA SCLEX_ADA static const HLStyle highlighting_styles_ADA[] = { - { SCE_ADA_DEFAULT, "default", FALSE }, - { SCE_ADA_WORD, "word", FALSE }, - { SCE_ADA_IDENTIFIER, "identifier", FALSE }, - { SCE_ADA_NUMBER, "number", FALSE }, - { SCE_ADA_DELIMITER, "delimiter", FALSE }, - { SCE_ADA_CHARACTER, "character", FALSE }, - { SCE_ADA_CHARACTEREOL, "charactereol", FALSE }, - { SCE_ADA_STRING, "string", FALSE }, - { SCE_ADA_STRINGEOL, "stringeol", FALSE }, - { SCE_ADA_LABEL, "label", FALSE }, - { SCE_ADA_COMMENTLINE, "commentline", FALSE }, - { SCE_ADA_ILLEGAL, "illegal", FALSE } + { SCE_ADA_DEFAULT, "default", FALSE, FALSE }, + { SCE_ADA_WORD, "word", FALSE, FALSE }, + { SCE_ADA_IDENTIFIER, "identifier", FALSE, FALSE }, + { SCE_ADA_NUMBER, "number", FALSE, FALSE }, + { SCE_ADA_DELIMITER, "delimiter", FALSE, FALSE }, + { SCE_ADA_CHARACTER, "character", FALSE, FALSE }, + { SCE_ADA_CHARACTEREOL, "charactereol", FALSE, FALSE }, + { SCE_ADA_STRING, "string", FALSE, FALSE }, + { SCE_ADA_STRINGEOL, "stringeol", FALSE, FALSE }, + { SCE_ADA_LABEL, "label", FALSE, FALSE }, + { SCE_ADA_COMMENTLINE, "commentline", FALSE, FALSE }, + { SCE_ADA_ILLEGAL, "illegal", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_ADA[] = { @@ -145,30 +146,30 @@ static const HLKeyword highlighting_keywords_AS[] = #define highlighting_lexer_ASCIIDOC SCLEX_ASCIIDOC static const HLStyle highlighting_styles_ASCIIDOC[] = { - { SCE_ASCIIDOC_DEFAULT, "default", FALSE }, - { SCE_ASCIIDOC_STRONG1, "strong", FALSE }, - { SCE_ASCIIDOC_STRONG2, "strong", FALSE }, - { SCE_ASCIIDOC_EM1, "emphasis", FALSE }, - { SCE_ASCIIDOC_EM2, "emphasis", FALSE }, - { SCE_ASCIIDOC_HEADER1, "header1", FALSE }, - { SCE_ASCIIDOC_HEADER2, "header2", FALSE }, - { SCE_ASCIIDOC_HEADER3, "header3", FALSE }, - { SCE_ASCIIDOC_HEADER4, "header4", FALSE }, - { SCE_ASCIIDOC_HEADER5, "header5", FALSE }, - { SCE_ASCIIDOC_HEADER6, "header6", FALSE }, - { SCE_ASCIIDOC_ULIST_ITEM, "ulist_item", FALSE }, - { SCE_ASCIIDOC_OLIST_ITEM, "olist_item", FALSE }, - { SCE_ASCIIDOC_BLOCKQUOTE, "blockquote", FALSE }, - { SCE_ASCIIDOC_LINK, "link", FALSE }, - { SCE_ASCIIDOC_CODEBK, "code", FALSE }, - { SCE_ASCIIDOC_PASSBK, "passthrough", FALSE }, - { SCE_ASCIIDOC_COMMENT, "comment", FALSE }, - { SCE_ASCIIDOC_COMMENTBK, "comment", FALSE }, - { SCE_ASCIIDOC_LITERAL, "literal", FALSE }, - { SCE_ASCIIDOC_LITERALBK, "literal", FALSE }, - { SCE_ASCIIDOC_ATTRIB, "attrib", FALSE }, - { SCE_ASCIIDOC_ATTRIBVAL, "attribval", FALSE }, - { SCE_ASCIIDOC_MACRO, "macro", FALSE } + { SCE_ASCIIDOC_DEFAULT, "default", FALSE, FALSE }, + { SCE_ASCIIDOC_STRONG1, "strong", FALSE, FALSE }, + { SCE_ASCIIDOC_STRONG2, "strong", FALSE, FALSE }, + { SCE_ASCIIDOC_EM1, "emphasis", FALSE, FALSE }, + { SCE_ASCIIDOC_EM2, "emphasis", FALSE, FALSE }, + { SCE_ASCIIDOC_HEADER1, "header1", FALSE, FALSE }, + { SCE_ASCIIDOC_HEADER2, "header2", FALSE, FALSE }, + { SCE_ASCIIDOC_HEADER3, "header3", FALSE, FALSE }, + { SCE_ASCIIDOC_HEADER4, "header4", FALSE, FALSE }, + { SCE_ASCIIDOC_HEADER5, "header5", FALSE, FALSE }, + { SCE_ASCIIDOC_HEADER6, "header6", FALSE, FALSE }, + { SCE_ASCIIDOC_ULIST_ITEM, "ulist_item", FALSE, FALSE }, + { SCE_ASCIIDOC_OLIST_ITEM, "olist_item", FALSE, FALSE }, + { SCE_ASCIIDOC_BLOCKQUOTE, "blockquote", FALSE, FALSE }, + { SCE_ASCIIDOC_LINK, "link", FALSE, FALSE }, + { SCE_ASCIIDOC_CODEBK, "code", FALSE, FALSE }, + { SCE_ASCIIDOC_PASSBK, "passthrough", FALSE, FALSE }, + { SCE_ASCIIDOC_COMMENT, "comment", FALSE, FALSE }, + { SCE_ASCIIDOC_COMMENTBK, "comment", FALSE, FALSE }, + { SCE_ASCIIDOC_LITERAL, "literal", FALSE, FALSE }, + { SCE_ASCIIDOC_LITERALBK, "literal", FALSE, FALSE }, + { SCE_ASCIIDOC_ATTRIB, "attrib", FALSE, FALSE }, + { SCE_ASCIIDOC_ATTRIBVAL, "attribval", FALSE, FALSE }, + { SCE_ASCIIDOC_MACRO, "macro", FALSE, FALSE } }; #define highlighting_keywords_ASCIIDOC EMPTY_KEYWORDS #define highlighting_properties_ASCIIDOC EMPTY_PROPERTIES @@ -178,22 +179,22 @@ static const HLStyle highlighting_styles_ASCIIDOC[] = #define highlighting_lexer_ASM SCLEX_ASM static const HLStyle highlighting_styles_ASM[] = { - { SCE_ASM_DEFAULT, "default", FALSE }, - { SCE_ASM_COMMENT, "comment", FALSE }, - { SCE_ASM_NUMBER, "number", FALSE }, - { SCE_ASM_STRING, "string", FALSE }, - { SCE_ASM_OPERATOR, "operator", FALSE }, - { SCE_ASM_IDENTIFIER, "identifier", FALSE }, - { SCE_ASM_CPUINSTRUCTION, "cpuinstruction", FALSE }, - { SCE_ASM_MATHINSTRUCTION, "mathinstruction", FALSE }, - { SCE_ASM_REGISTER, "register", FALSE }, - { SCE_ASM_DIRECTIVE, "directive", FALSE }, - { SCE_ASM_DIRECTIVEOPERAND, "directiveoperand", FALSE }, - { SCE_ASM_COMMENTBLOCK, "commentblock", FALSE }, - { SCE_ASM_CHARACTER, "character", FALSE }, - { SCE_ASM_STRINGEOL, "stringeol", FALSE }, - { SCE_ASM_EXTINSTRUCTION, "extinstruction", FALSE }, - { SCE_ASM_COMMENTDIRECTIVE, "commentdirective", FALSE } + { SCE_ASM_DEFAULT, "default", FALSE, FALSE }, + { SCE_ASM_COMMENT, "comment", FALSE, FALSE }, + { SCE_ASM_NUMBER, "number", FALSE, FALSE }, + { SCE_ASM_STRING, "string", FALSE, FALSE }, + { SCE_ASM_OPERATOR, "operator", FALSE, FALSE }, + { SCE_ASM_IDENTIFIER, "identifier", FALSE, FALSE }, + { SCE_ASM_CPUINSTRUCTION, "cpuinstruction", FALSE, FALSE }, + { SCE_ASM_MATHINSTRUCTION, "mathinstruction", FALSE, FALSE }, + { SCE_ASM_REGISTER, "register", FALSE, FALSE }, + { SCE_ASM_DIRECTIVE, "directive", FALSE, FALSE }, + { SCE_ASM_DIRECTIVEOPERAND, "directiveoperand", FALSE, FALSE }, + { SCE_ASM_COMMENTBLOCK, "commentblock", FALSE, FALSE }, + { SCE_ASM_CHARACTER, "character", FALSE, FALSE }, + { SCE_ASM_STRINGEOL, "stringeol", FALSE, FALSE }, + { SCE_ASM_EXTINSTRUCTION, "extinstruction", FALSE, FALSE }, + { SCE_ASM_COMMENTDIRECTIVE, "commentdirective", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_ASM[] = { @@ -210,29 +211,29 @@ static const HLKeyword highlighting_keywords_ASM[] = #define highlighting_lexer_BASIC SCLEX_FREEBASIC static const HLStyle highlighting_styles_BASIC[] = { - { SCE_B_DEFAULT, "default", FALSE }, - { SCE_B_COMMENT, "comment", FALSE }, - { SCE_B_COMMENTBLOCK, "commentblock", FALSE }, - { SCE_B_DOCLINE, "docline", FALSE }, - { SCE_B_DOCBLOCK, "docblock", FALSE }, - { SCE_B_DOCKEYWORD, "dockeyword", FALSE }, - { SCE_B_NUMBER, "number", FALSE }, - { SCE_B_KEYWORD, "word", FALSE }, - { SCE_B_STRING, "string", FALSE }, - { SCE_B_PREPROCESSOR, "preprocessor", FALSE }, - { SCE_B_OPERATOR, "operator", FALSE }, - { SCE_B_IDENTIFIER, "identifier", FALSE }, - { SCE_B_DATE, "date", FALSE }, - { SCE_B_STRINGEOL, "stringeol", FALSE }, - { SCE_B_KEYWORD2, "word2", FALSE }, - { SCE_B_KEYWORD3, "word3", FALSE }, - { SCE_B_KEYWORD4, "word4", FALSE }, - { SCE_B_CONSTANT, "constant", FALSE }, - { SCE_B_ASM, "asm", FALSE }, - { SCE_B_LABEL, "label", FALSE }, - { SCE_B_ERROR, "error", FALSE }, - { SCE_B_HEXNUMBER, "hexnumber", FALSE }, - { SCE_B_BINNUMBER, "binnumber", FALSE } + { SCE_B_DEFAULT, "default", FALSE, FALSE }, + { SCE_B_COMMENT, "comment", FALSE, FALSE }, + { SCE_B_COMMENTBLOCK, "commentblock", FALSE, FALSE }, + { SCE_B_DOCLINE, "docline", FALSE, FALSE }, + { SCE_B_DOCBLOCK, "docblock", FALSE, FALSE }, + { SCE_B_DOCKEYWORD, "dockeyword", FALSE, FALSE }, + { SCE_B_NUMBER, "number", FALSE, FALSE }, + { SCE_B_KEYWORD, "word", FALSE, FALSE }, + { SCE_B_STRING, "string", FALSE, FALSE }, + { SCE_B_PREPROCESSOR, "preprocessor", FALSE, FALSE }, + { SCE_B_OPERATOR, "operator", FALSE, FALSE }, + { SCE_B_IDENTIFIER, "identifier", FALSE, FALSE }, + { SCE_B_DATE, "date", FALSE, FALSE }, + { SCE_B_STRINGEOL, "stringeol", FALSE, FALSE }, + { SCE_B_KEYWORD2, "word2", FALSE, FALSE }, + { SCE_B_KEYWORD3, "word3", FALSE, FALSE }, + { SCE_B_KEYWORD4, "word4", FALSE, FALSE }, + { SCE_B_CONSTANT, "constant", FALSE, FALSE }, + { SCE_B_ASM, "asm", FALSE, FALSE }, + { SCE_B_LABEL, "label", FALSE, FALSE }, + { SCE_B_ERROR, "error", FALSE, FALSE }, + { SCE_B_HEXNUMBER, "hexnumber", FALSE, FALSE }, + { SCE_B_BINNUMBER, "binnumber", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_BASIC[] = { @@ -248,14 +249,14 @@ static const HLKeyword highlighting_keywords_BASIC[] = #define highlighting_lexer_BATCH SCLEX_BATCH static const HLStyle highlighting_styles_BATCH[] = { - { SCE_BAT_DEFAULT, "default", FALSE }, - { SCE_BAT_COMMENT, "comment", FALSE }, - { SCE_BAT_LABEL, "label", FALSE }, - { SCE_BAT_WORD, "word", FALSE }, - { SCE_BAT_HIDE, "hide", FALSE }, - { SCE_BAT_COMMAND, "command", FALSE }, - { SCE_BAT_IDENTIFIER, "identifier", FALSE }, - { SCE_BAT_OPERATOR, "operator", FALSE } + { SCE_BAT_DEFAULT, "default", FALSE, FALSE }, + { SCE_BAT_COMMENT, "comment", FALSE, FALSE }, + { SCE_BAT_LABEL, "label", FALSE, FALSE }, + { SCE_BAT_WORD, "word", FALSE, FALSE }, + { SCE_BAT_HIDE, "hide", FALSE, FALSE }, + { SCE_BAT_COMMAND, "command", FALSE, FALSE }, + { SCE_BAT_IDENTIFIER, "identifier", FALSE, FALSE }, + { SCE_BAT_OPERATOR, "operator", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_BATCH[] = { @@ -270,36 +271,36 @@ static const HLKeyword highlighting_keywords_BATCH[] = #define highlighting_lexer_C SCLEX_CPP static const HLStyle highlighting_styles_C[] = { - { SCE_C_DEFAULT, "default", FALSE }, - { SCE_C_COMMENT, "comment", FALSE }, - { SCE_C_COMMENTLINE, "commentline", FALSE }, - { SCE_C_COMMENTDOC, "commentdoc", FALSE }, - { SCE_C_PREPROCESSORCOMMENT, "preprocessorcomment", FALSE }, - { SCE_C_PREPROCESSORCOMMENTDOC, "preprocessorcommentdoc", FALSE }, - { SCE_C_NUMBER, "number", FALSE }, - { SCE_C_WORD, "word", FALSE }, - { SCE_C_WORD2, "word2", FALSE }, - { SCE_C_STRING, "string", FALSE }, - { SCE_C_STRINGRAW, "stringraw", FALSE }, - { SCE_C_CHARACTER, "character", FALSE }, - { SCE_C_USERLITERAL, "userliteral", FALSE }, - { SCE_C_UUID, "uuid", FALSE }, - { SCE_C_PREPROCESSOR, "preprocessor", FALSE }, - { SCE_C_OPERATOR, "operator", FALSE }, - { SCE_C_IDENTIFIER, "identifier", FALSE }, - { SCE_C_STRINGEOL, "stringeol", FALSE }, - { SCE_C_VERBATIM, "verbatim", FALSE }, + { SCE_C_DEFAULT, "default", FALSE, FALSE }, + { SCE_C_COMMENT, "comment", FALSE, FALSE }, + { SCE_C_COMMENTLINE, "commentline", FALSE, FALSE }, + { SCE_C_COMMENTDOC, "commentdoc", FALSE, FALSE }, + { SCE_C_PREPROCESSORCOMMENT, "preprocessorcomment", FALSE, FALSE }, + { SCE_C_PREPROCESSORCOMMENTDOC, "preprocessorcommentdoc", FALSE, FALSE }, + { SCE_C_NUMBER, "number", FALSE, FALSE }, + { SCE_C_WORD, "word", FALSE, FALSE }, + { SCE_C_WORD2, "word2", FALSE, FALSE }, + { SCE_C_STRING, "string", FALSE, FALSE }, + { SCE_C_STRINGRAW, "stringraw", FALSE, FALSE }, + { SCE_C_CHARACTER, "character", FALSE, FALSE }, + { SCE_C_USERLITERAL, "userliteral", FALSE, FALSE }, + { SCE_C_UUID, "uuid", FALSE, FALSE }, + { SCE_C_PREPROCESSOR, "preprocessor", FALSE, FALSE }, + { SCE_C_OPERATOR, "operator", FALSE, FALSE }, + { SCE_C_IDENTIFIER, "identifier", FALSE, TRUE }, + { SCE_C_STRINGEOL, "stringeol", FALSE, FALSE }, + { SCE_C_VERBATIM, "verbatim", FALSE, FALSE }, /* triple verbatims use the same style */ - { SCE_C_TRIPLEVERBATIM, "verbatim", FALSE }, - { SCE_C_REGEX, "regex", FALSE }, - { SCE_C_HASHQUOTEDSTRING, "hashquotedstring", FALSE }, - { SCE_C_COMMENTLINEDOC, "commentlinedoc", FALSE }, - { SCE_C_COMMENTDOCKEYWORD, "commentdockeyword", FALSE }, - { SCE_C_COMMENTDOCKEYWORDERROR, "commentdockeyworderror", FALSE }, + { SCE_C_TRIPLEVERBATIM, "verbatim", FALSE, FALSE }, + { SCE_C_REGEX, "regex", FALSE, FALSE }, + { SCE_C_HASHQUOTEDSTRING, "hashquotedstring", FALSE, FALSE }, + { SCE_C_COMMENTLINEDOC, "commentlinedoc", FALSE, FALSE }, + { SCE_C_COMMENTDOCKEYWORD, "commentdockeyword", FALSE, TRUE }, + { SCE_C_COMMENTDOCKEYWORDERROR, "commentdockeyworderror", FALSE, FALSE }, /* used for local structs and typedefs */ - { SCE_C_GLOBALCLASS, "globalclass", FALSE }, - { SCE_C_TASKMARKER, "taskmarker", FALSE }, - { SCE_C_ESCAPESEQUENCE, "escapesequence", FALSE } + { SCE_C_GLOBALCLASS, "globalclass", FALSE, FALSE }, + { SCE_C_TASKMARKER, "taskmarker", FALSE, FALSE }, + { SCE_C_ESCAPESEQUENCE, "escapesequence", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_C[] = { @@ -319,22 +320,22 @@ static const HLProperty highlighting_properties_C[] = #define highlighting_lexer_CAML SCLEX_CAML static const HLStyle highlighting_styles_CAML[] = { - { SCE_CAML_DEFAULT, "default", FALSE }, - { SCE_CAML_COMMENT, "comment", FALSE }, - { SCE_CAML_COMMENT1, "comment1", FALSE }, - { SCE_CAML_COMMENT2, "comment2", FALSE }, - { SCE_CAML_COMMENT3, "comment3", FALSE }, - { SCE_CAML_NUMBER, "number", FALSE }, - { SCE_CAML_KEYWORD, "keyword", FALSE }, - { SCE_CAML_KEYWORD2, "keyword2", FALSE }, - { SCE_CAML_KEYWORD3, "keyword3", FALSE }, - { SCE_CAML_STRING, "string", FALSE }, - { SCE_CAML_CHAR, "char", FALSE }, - { SCE_CAML_OPERATOR, "operator", FALSE }, - { SCE_CAML_IDENTIFIER, "identifier", FALSE }, - { SCE_CAML_TAGNAME, "tagname", FALSE }, - { SCE_CAML_LINENUM, "linenum", FALSE }, - { SCE_CAML_WHITE, "white", FALSE } + { SCE_CAML_DEFAULT, "default", FALSE, FALSE }, + { SCE_CAML_COMMENT, "comment", FALSE, FALSE }, + { SCE_CAML_COMMENT1, "comment1", FALSE, FALSE }, + { SCE_CAML_COMMENT2, "comment2", FALSE, FALSE }, + { SCE_CAML_COMMENT3, "comment3", FALSE, FALSE }, + { SCE_CAML_NUMBER, "number", FALSE, FALSE }, + { SCE_CAML_KEYWORD, "keyword", FALSE, FALSE }, + { SCE_CAML_KEYWORD2, "keyword2", FALSE, FALSE }, + { SCE_CAML_KEYWORD3, "keyword3", FALSE, FALSE }, + { SCE_CAML_STRING, "string", FALSE, FALSE }, + { SCE_CAML_CHAR, "char", FALSE, FALSE }, + { SCE_CAML_OPERATOR, "operator", FALSE, FALSE }, + { SCE_CAML_IDENTIFIER, "identifier", FALSE, FALSE }, + { SCE_CAML_TAGNAME, "tagname", FALSE, FALSE }, + { SCE_CAML_LINENUM, "linenum", FALSE, FALSE }, + { SCE_CAML_WHITE, "white", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_CAML[] = { @@ -348,21 +349,21 @@ static const HLKeyword highlighting_keywords_CAML[] = #define highlighting_lexer_CMAKE SCLEX_CMAKE static const HLStyle highlighting_styles_CMAKE[] = { - { SCE_CMAKE_DEFAULT, "default", FALSE }, - { SCE_CMAKE_COMMENT, "comment", FALSE }, - { SCE_CMAKE_STRINGDQ, "stringdq", FALSE }, - { SCE_CMAKE_STRINGLQ, "stringlq", FALSE }, - { SCE_CMAKE_STRINGRQ, "stringrq", FALSE }, - { SCE_CMAKE_COMMANDS, "command", FALSE }, - { SCE_CMAKE_PARAMETERS, "parameters", FALSE }, - { SCE_CMAKE_VARIABLE, "variable", FALSE }, - { SCE_CMAKE_USERDEFINED, "userdefined", FALSE }, - { SCE_CMAKE_WHILEDEF, "whiledef", FALSE }, - { SCE_CMAKE_FOREACHDEF, "foreachdef", FALSE }, - { SCE_CMAKE_IFDEFINEDEF, "ifdefinedef", FALSE }, - { SCE_CMAKE_MACRODEF, "macrodef", FALSE }, - { SCE_CMAKE_STRINGVAR, "stringvar", FALSE }, - { SCE_CMAKE_NUMBER, "number", FALSE } + { SCE_CMAKE_DEFAULT, "default", FALSE, FALSE }, + { SCE_CMAKE_COMMENT, "comment", FALSE, FALSE }, + { SCE_CMAKE_STRINGDQ, "stringdq", FALSE, FALSE }, + { SCE_CMAKE_STRINGLQ, "stringlq", FALSE, FALSE }, + { SCE_CMAKE_STRINGRQ, "stringrq", FALSE, FALSE }, + { SCE_CMAKE_COMMANDS, "command", FALSE, FALSE }, + { SCE_CMAKE_PARAMETERS, "parameters", FALSE, FALSE }, + { SCE_CMAKE_VARIABLE, "variable", FALSE, FALSE }, + { SCE_CMAKE_USERDEFINED, "userdefined", FALSE, FALSE }, + { SCE_CMAKE_WHILEDEF, "whiledef", FALSE, FALSE }, + { SCE_CMAKE_FOREACHDEF, "foreachdef", FALSE, FALSE }, + { SCE_CMAKE_IFDEFINEDEF, "ifdefinedef", FALSE, FALSE }, + { SCE_CMAKE_MACRODEF, "macrodef", FALSE, FALSE }, + { SCE_CMAKE_STRINGVAR, "stringvar", FALSE, FALSE }, + { SCE_CMAKE_NUMBER, "number", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_CMAKE[] = { @@ -376,22 +377,22 @@ static const HLKeyword highlighting_keywords_CMAKE[] = #define highlighting_lexer_COFFEESCRIPT SCLEX_COFFEESCRIPT static const HLStyle highlighting_styles_COFFEESCRIPT[] = { - { SCE_COFFEESCRIPT_DEFAULT, "default", FALSE }, - { SCE_COFFEESCRIPT_COMMENTLINE, "commentline", FALSE }, - { SCE_COFFEESCRIPT_NUMBER, "number", FALSE }, - { SCE_COFFEESCRIPT_WORD, "word", FALSE }, - { SCE_COFFEESCRIPT_STRING, "string", FALSE }, - { SCE_COFFEESCRIPT_CHARACTER, "character", FALSE }, - { SCE_COFFEESCRIPT_OPERATOR, "operator", FALSE }, - { SCE_COFFEESCRIPT_IDENTIFIER, "identifier", FALSE }, - { SCE_COFFEESCRIPT_STRINGEOL, "stringeol", FALSE }, - { SCE_COFFEESCRIPT_REGEX, "regex", FALSE }, - { SCE_COFFEESCRIPT_WORD2, "word2", FALSE }, - { SCE_COFFEESCRIPT_GLOBALCLASS, "globalclass", FALSE }, - { SCE_COFFEESCRIPT_COMMENTBLOCK, "commentblock", FALSE }, - { SCE_COFFEESCRIPT_VERBOSE_REGEX, "verbose_regex", FALSE }, - { SCE_COFFEESCRIPT_VERBOSE_REGEX_COMMENT, "verbose_regex_comment",FALSE }, - { SCE_COFFEESCRIPT_INSTANCEPROPERTY, "instanceproperty", FALSE } + { SCE_COFFEESCRIPT_DEFAULT, "default", FALSE, FALSE }, + { SCE_COFFEESCRIPT_COMMENTLINE, "commentline", FALSE, FALSE }, + { SCE_COFFEESCRIPT_NUMBER, "number", FALSE, FALSE }, + { SCE_COFFEESCRIPT_WORD, "word", FALSE, FALSE }, + { SCE_COFFEESCRIPT_STRING, "string", FALSE, FALSE }, + { SCE_COFFEESCRIPT_CHARACTER, "character", FALSE, FALSE }, + { SCE_COFFEESCRIPT_OPERATOR, "operator", FALSE, FALSE }, + { SCE_COFFEESCRIPT_IDENTIFIER, "identifier", FALSE, FALSE }, + { SCE_COFFEESCRIPT_STRINGEOL, "stringeol", FALSE, FALSE }, + { SCE_COFFEESCRIPT_REGEX, "regex", FALSE, FALSE }, + { SCE_COFFEESCRIPT_WORD2, "word2", FALSE, FALSE }, + { SCE_COFFEESCRIPT_GLOBALCLASS, "globalclass", FALSE, FALSE }, + { SCE_COFFEESCRIPT_COMMENTBLOCK, "commentblock", FALSE, FALSE }, + { SCE_COFFEESCRIPT_VERBOSE_REGEX, "verbose_regex", FALSE, FALSE }, + { SCE_COFFEESCRIPT_VERBOSE_REGEX_COMMENT, "verbose_regex_comment",FALSE, FALSE }, + { SCE_COFFEESCRIPT_INSTANCEPROPERTY, "instanceproperty", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_COFFEESCRIPT[] = { @@ -406,30 +407,30 @@ static const HLKeyword highlighting_keywords_COFFEESCRIPT[] = #define highlighting_lexer_CSS SCLEX_CSS static const HLStyle highlighting_styles_CSS[] = { - { SCE_CSS_DEFAULT, "default", FALSE }, - { SCE_CSS_COMMENT, "comment", FALSE }, - { SCE_CSS_TAG, "tag", FALSE }, - { SCE_CSS_CLASS, "class", FALSE }, - { SCE_CSS_PSEUDOCLASS, "pseudoclass", FALSE }, - { SCE_CSS_UNKNOWN_PSEUDOCLASS, "unknown_pseudoclass", FALSE }, - { SCE_CSS_UNKNOWN_IDENTIFIER, "unknown_identifier", FALSE }, - { SCE_CSS_OPERATOR, "operator", FALSE }, - { SCE_CSS_IDENTIFIER, "identifier", FALSE }, - { SCE_CSS_DOUBLESTRING, "doublestring", FALSE }, - { SCE_CSS_SINGLESTRING, "singlestring", FALSE }, - { SCE_CSS_ATTRIBUTE, "attribute", FALSE }, - { SCE_CSS_VALUE, "value", FALSE }, - { SCE_CSS_ID, "id", FALSE }, - { SCE_CSS_IDENTIFIER2, "identifier2", FALSE }, - { SCE_CSS_VARIABLE, "variable", FALSE }, - { SCE_CSS_IMPORTANT, "important", FALSE }, - { SCE_CSS_DIRECTIVE, "directive", FALSE }, - { SCE_CSS_IDENTIFIER3, "identifier3", FALSE }, - { SCE_CSS_PSEUDOELEMENT, "pseudoelement", FALSE }, - { SCE_CSS_EXTENDED_IDENTIFIER, "extended_identifier", FALSE }, - { SCE_CSS_EXTENDED_PSEUDOCLASS, "extended_pseudoclass", FALSE }, - { SCE_CSS_EXTENDED_PSEUDOELEMENT, "extended_pseudoelement", FALSE }, - { SCE_CSS_GROUP_RULE, "group_rule", FALSE } + { SCE_CSS_DEFAULT, "default", FALSE, FALSE }, + { SCE_CSS_COMMENT, "comment", FALSE, FALSE }, + { SCE_CSS_TAG, "tag", FALSE, FALSE }, + { SCE_CSS_CLASS, "class", FALSE, FALSE }, + { SCE_CSS_PSEUDOCLASS, "pseudoclass", FALSE, FALSE }, + { SCE_CSS_UNKNOWN_PSEUDOCLASS, "unknown_pseudoclass", FALSE, FALSE }, + { SCE_CSS_UNKNOWN_IDENTIFIER, "unknown_identifier", FALSE, FALSE }, + { SCE_CSS_OPERATOR, "operator", FALSE, FALSE }, + { SCE_CSS_IDENTIFIER, "identifier", FALSE, FALSE }, + { SCE_CSS_DOUBLESTRING, "doublestring", FALSE, FALSE }, + { SCE_CSS_SINGLESTRING, "singlestring", FALSE, FALSE }, + { SCE_CSS_ATTRIBUTE, "attribute", FALSE, FALSE }, + { SCE_CSS_VALUE, "value", FALSE, FALSE }, + { SCE_CSS_ID, "id", FALSE, FALSE }, + { SCE_CSS_IDENTIFIER2, "identifier2", FALSE, FALSE }, + { SCE_CSS_VARIABLE, "variable", FALSE, FALSE }, + { SCE_CSS_IMPORTANT, "important", FALSE, FALSE }, + { SCE_CSS_DIRECTIVE, "directive", FALSE, FALSE }, + { SCE_CSS_IDENTIFIER3, "identifier3", FALSE, FALSE }, + { SCE_CSS_PSEUDOELEMENT, "pseudoelement", FALSE, FALSE }, + { SCE_CSS_EXTENDED_IDENTIFIER, "extended_identifier", FALSE, FALSE }, + { SCE_CSS_EXTENDED_PSEUDOCLASS, "extended_pseudoclass", FALSE, FALSE }, + { SCE_CSS_EXTENDED_PSEUDOELEMENT, "extended_pseudoelement", FALSE, FALSE }, + { SCE_CSS_GROUP_RULE, "group_rule", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_CSS[] = { @@ -461,12 +462,12 @@ static const HLKeyword highlighting_keywords_COBOL[] = #define highlighting_lexer_CONF SCLEX_PROPERTIES static const HLStyle highlighting_styles_CONF[] = { - { SCE_PROPS_DEFAULT, "default", FALSE }, - { SCE_PROPS_COMMENT, "comment", FALSE }, - { SCE_PROPS_SECTION, "section", FALSE }, - { SCE_PROPS_KEY, "key", FALSE }, - { SCE_PROPS_ASSIGNMENT, "assignment", FALSE }, - { SCE_PROPS_DEFVAL, "defval", FALSE } + { SCE_PROPS_DEFAULT, "default", FALSE, FALSE }, + { SCE_PROPS_COMMENT, "comment", FALSE, FALSE }, + { SCE_PROPS_SECTION, "section", FALSE, FALSE }, + { SCE_PROPS_KEY, "key", FALSE, FALSE }, + { SCE_PROPS_ASSIGNMENT, "assignment", FALSE, FALSE }, + { SCE_PROPS_DEFVAL, "defval", FALSE, FALSE } }; #define highlighting_keywords_CONF EMPTY_KEYWORDS #define highlighting_properties_CONF EMPTY_PROPERTIES @@ -476,30 +477,30 @@ static const HLStyle highlighting_styles_CONF[] = #define highlighting_lexer_D SCLEX_D static const HLStyle highlighting_styles_D[] = { - { SCE_D_DEFAULT, "default", FALSE }, - { SCE_D_COMMENT, "comment", FALSE }, - { SCE_D_COMMENTLINE, "commentline", FALSE }, - { SCE_D_COMMENTDOC, "commentdoc", FALSE }, - { SCE_D_COMMENTNESTED, "commentnested", FALSE }, - { SCE_D_NUMBER, "number", FALSE }, - { SCE_D_WORD, "word", FALSE }, - { SCE_D_WORD2, "word2", FALSE }, - { SCE_D_WORD3, "word3", FALSE }, - { SCE_D_TYPEDEF, "typedef", FALSE }, /* FIXME: don't remap here */ - { SCE_D_WORD5, "typedef", FALSE }, - { SCE_D_STRING, "string", FALSE }, - { SCE_D_STRINGB, "string", FALSE }, - { SCE_D_STRINGR, "string", FALSE }, - { SCE_D_STRINGEOL, "stringeol", FALSE }, - { SCE_D_CHARACTER, "character", FALSE }, - { SCE_D_OPERATOR, "operator", FALSE }, - { SCE_D_IDENTIFIER, "identifier", FALSE }, - { SCE_D_COMMENTLINEDOC, "commentlinedoc", FALSE }, - { SCE_D_COMMENTDOCKEYWORD, "commentdockeyword", FALSE }, - { SCE_D_COMMENTDOCKEYWORDERROR, "commentdockeyworderror", FALSE } + { SCE_D_DEFAULT, "default", FALSE, FALSE }, + { SCE_D_COMMENT, "comment", FALSE, FALSE }, + { SCE_D_COMMENTLINE, "commentline", FALSE, FALSE }, + { SCE_D_COMMENTDOC, "commentdoc", FALSE, FALSE }, + { SCE_D_COMMENTNESTED, "commentnested", FALSE, FALSE }, + { SCE_D_NUMBER, "number", FALSE, FALSE }, + { SCE_D_WORD, "word", FALSE, FALSE }, + { SCE_D_WORD2, "word2", FALSE, FALSE }, + { SCE_D_WORD3, "word3", FALSE, FALSE }, + { SCE_D_TYPEDEF, "typedef", FALSE, FALSE }, /* FIXME: don't remap here */ + { SCE_D_WORD5, "typedef", FALSE, FALSE }, + { SCE_D_STRING, "string", FALSE, FALSE }, + { SCE_D_STRINGB, "string", FALSE, FALSE }, + { SCE_D_STRINGR, "string", FALSE, FALSE }, + { SCE_D_STRINGEOL, "stringeol", FALSE, FALSE }, + { SCE_D_CHARACTER, "character", FALSE, FALSE }, + { SCE_D_OPERATOR, "operator", FALSE, FALSE }, + { SCE_D_IDENTIFIER, "identifier", FALSE, FALSE }, + { SCE_D_COMMENTLINEDOC, "commentlinedoc", FALSE, FALSE }, + { SCE_D_COMMENTDOCKEYWORD, "commentdockeyword", FALSE, FALSE }, + { SCE_D_COMMENTDOCKEYWORDERROR, "commentdockeyworderror", FALSE, FALSE } /* these are for user-defined keywords we don't set yet */ - /*{ SCE_D_WORD6, "word6", FALSE }, - { SCE_D_WORD7, "word7", FALSE }*/ + /*{ SCE_D_WORD6, "word6", FALSE, FALSE }, + { SCE_D_WORD7, "word7", FALSE, FALSE }*/ }; static const HLKeyword highlighting_keywords_D[] = { @@ -517,18 +518,18 @@ static const HLKeyword highlighting_keywords_D[] = #define highlighting_lexer_DIFF SCLEX_DIFF static const HLStyle highlighting_styles_DIFF[] = { - { SCE_DIFF_DEFAULT, "default", FALSE }, - { SCE_DIFF_COMMENT, "comment", FALSE }, - { SCE_DIFF_COMMAND, "command", FALSE }, - { SCE_DIFF_HEADER, "header", FALSE }, - { SCE_DIFF_POSITION, "position", FALSE }, - { SCE_DIFF_DELETED, "deleted", FALSE }, - { SCE_DIFF_ADDED, "added", FALSE }, - { SCE_DIFF_CHANGED, "changed", FALSE }, - { SCE_DIFF_PATCH_ADD, "patch_add", FALSE }, - { SCE_DIFF_PATCH_DELETE, "patch_delete", FALSE }, - { SCE_DIFF_REMOVED_PATCH_ADD, "removed_patch_add", FALSE }, - { SCE_DIFF_REMOVED_PATCH_DELETE, "removed_patch_delete", FALSE } + { SCE_DIFF_DEFAULT, "default", FALSE, FALSE }, + { SCE_DIFF_COMMENT, "comment", FALSE, FALSE }, + { SCE_DIFF_COMMAND, "command", FALSE, FALSE }, + { SCE_DIFF_HEADER, "header", FALSE, FALSE }, + { SCE_DIFF_POSITION, "position", FALSE, FALSE }, + { SCE_DIFF_DELETED, "deleted", FALSE, FALSE }, + { SCE_DIFF_ADDED, "added", FALSE, FALSE }, + { SCE_DIFF_CHANGED, "changed", FALSE, FALSE }, + { SCE_DIFF_PATCH_ADD, "patch_add", FALSE, FALSE }, + { SCE_DIFF_PATCH_DELETE, "patch_delete", FALSE, FALSE }, + { SCE_DIFF_REMOVED_PATCH_ADD, "removed_patch_add", FALSE, FALSE }, + { SCE_DIFF_REMOVED_PATCH_DELETE, "removed_patch_delete", FALSE, FALSE } }; #define highlighting_keywords_DIFF EMPTY_KEYWORDS #define highlighting_properties_DIFF EMPTY_PROPERTIES @@ -537,35 +538,35 @@ static const HLStyle highlighting_styles_DIFF[] = #define highlighting_lexer_DOCBOOK SCLEX_XML static const HLStyle highlighting_styles_DOCBOOK[] = { - { SCE_H_DEFAULT, "default", FALSE }, - { SCE_H_TAG, "tag", FALSE }, - { SCE_H_TAGUNKNOWN, "tagunknown", FALSE }, - { SCE_H_ATTRIBUTE, "attribute", FALSE }, - { SCE_H_ATTRIBUTEUNKNOWN, "attributeunknown", FALSE }, - { SCE_H_NUMBER, "number", FALSE }, - { SCE_H_DOUBLESTRING, "doublestring", FALSE }, - { SCE_H_SINGLESTRING, "singlestring", FALSE }, - { SCE_H_OTHER, "other", FALSE }, - { SCE_H_COMMENT, "comment", FALSE }, - { SCE_H_ENTITY, "entity", FALSE }, - { SCE_H_TAGEND, "tagend", FALSE }, - { SCE_H_XMLSTART, "xmlstart", TRUE }, - { SCE_H_XMLEND, "xmlend", FALSE }, - { SCE_H_CDATA, "cdata", FALSE }, - { SCE_H_QUESTION, "question", FALSE }, - { SCE_H_VALUE, "value", FALSE }, - { SCE_H_XCCOMMENT, "xccomment", FALSE }, - { SCE_H_SGML_DEFAULT, "sgml_default", FALSE }, - { SCE_H_SGML_COMMENT, "sgml_comment", FALSE }, - { SCE_H_SGML_SPECIAL, "sgml_special", FALSE }, - { SCE_H_SGML_COMMAND, "sgml_command", FALSE }, - { SCE_H_SGML_DOUBLESTRING, "sgml_doublestring", FALSE }, - { SCE_H_SGML_SIMPLESTRING, "sgml_simplestring", FALSE }, - { SCE_H_SGML_1ST_PARAM, "sgml_1st_param", FALSE }, - { SCE_H_SGML_ENTITY, "sgml_entity", FALSE }, - { SCE_H_SGML_BLOCK_DEFAULT, "sgml_block_default", FALSE }, - { SCE_H_SGML_1ST_PARAM_COMMENT, "sgml_1st_param_comment", FALSE }, - { SCE_H_SGML_ERROR, "sgml_error", FALSE } + { SCE_H_DEFAULT, "default", FALSE, FALSE }, + { SCE_H_TAG, "tag", FALSE, FALSE }, + { SCE_H_TAGUNKNOWN, "tagunknown", FALSE, FALSE }, + { SCE_H_ATTRIBUTE, "attribute", FALSE, FALSE }, + { SCE_H_ATTRIBUTEUNKNOWN, "attributeunknown", FALSE, FALSE }, + { SCE_H_NUMBER, "number", FALSE, FALSE }, + { SCE_H_DOUBLESTRING, "doublestring", FALSE, FALSE }, + { SCE_H_SINGLESTRING, "singlestring", FALSE, FALSE }, + { SCE_H_OTHER, "other", FALSE, FALSE }, + { SCE_H_COMMENT, "comment", FALSE, FALSE }, + { SCE_H_ENTITY, "entity", FALSE, FALSE }, + { SCE_H_TAGEND, "tagend", FALSE, FALSE }, + { SCE_H_XMLSTART, "xmlstart", TRUE, FALSE }, + { SCE_H_XMLEND, "xmlend", FALSE, FALSE }, + { SCE_H_CDATA, "cdata", FALSE, FALSE }, + { SCE_H_QUESTION, "question", FALSE, FALSE }, + { SCE_H_VALUE, "value", FALSE, FALSE }, + { SCE_H_XCCOMMENT, "xccomment", FALSE, FALSE }, + { SCE_H_SGML_DEFAULT, "sgml_default", FALSE, FALSE }, + { SCE_H_SGML_COMMENT, "sgml_comment", FALSE, FALSE }, + { SCE_H_SGML_SPECIAL, "sgml_special", FALSE, FALSE }, + { SCE_H_SGML_COMMAND, "sgml_command", FALSE, FALSE }, + { SCE_H_SGML_DOUBLESTRING, "sgml_doublestring", FALSE, FALSE }, + { SCE_H_SGML_SIMPLESTRING, "sgml_simplestring", FALSE, FALSE }, + { SCE_H_SGML_1ST_PARAM, "sgml_1st_param", FALSE, FALSE }, + { SCE_H_SGML_ENTITY, "sgml_entity", FALSE, FALSE }, + { SCE_H_SGML_BLOCK_DEFAULT, "sgml_block_default", FALSE, FALSE }, + { SCE_H_SGML_1ST_PARAM_COMMENT, "sgml_1st_param_comment", FALSE, FALSE }, + { SCE_H_SGML_ERROR, "sgml_error", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_DOCBOOK[] = { @@ -579,32 +580,32 @@ static const HLKeyword highlighting_keywords_DOCBOOK[] = #define highlighting_lexer_ERLANG SCLEX_ERLANG static const HLStyle highlighting_styles_ERLANG[] = { - { SCE_ERLANG_DEFAULT, "default", FALSE }, - { SCE_ERLANG_COMMENT, "comment", FALSE }, - { SCE_ERLANG_VARIABLE, "variable", FALSE }, - { SCE_ERLANG_NUMBER, "number", FALSE }, - { SCE_ERLANG_KEYWORD, "keyword", FALSE }, - { SCE_ERLANG_STRING, "string", FALSE }, - { SCE_ERLANG_OPERATOR, "operator", FALSE }, - { SCE_ERLANG_ATOM, "atom", FALSE }, - { SCE_ERLANG_FUNCTION_NAME, "function_name", FALSE }, - { SCE_ERLANG_CHARACTER, "character", FALSE }, - { SCE_ERLANG_MACRO, "macro", FALSE }, - { SCE_ERLANG_RECORD, "record", FALSE }, - { SCE_ERLANG_PREPROC, "preproc", FALSE }, - { SCE_ERLANG_NODE_NAME, "node_name", FALSE }, - { SCE_ERLANG_COMMENT_FUNCTION, "comment_function", FALSE }, - { SCE_ERLANG_COMMENT_MODULE, "comment_module", FALSE }, - { SCE_ERLANG_COMMENT_DOC, "comment_doc", FALSE }, - { SCE_ERLANG_COMMENT_DOC_MACRO, "comment_doc_macro", FALSE }, - { SCE_ERLANG_ATOM_QUOTED, "atom_quoted", FALSE }, - { SCE_ERLANG_MACRO_QUOTED, "macro_quoted", FALSE }, - { SCE_ERLANG_RECORD_QUOTED, "record_quoted", FALSE }, - { SCE_ERLANG_NODE_NAME_QUOTED, "node_name_quoted", FALSE }, - { SCE_ERLANG_BIFS, "bifs", FALSE }, - { SCE_ERLANG_MODULES, "modules", FALSE }, - { SCE_ERLANG_MODULES_ATT, "modules_att", FALSE }, - { SCE_ERLANG_UNKNOWN, "unknown", FALSE } + { SCE_ERLANG_DEFAULT, "default", FALSE, FALSE }, + { SCE_ERLANG_COMMENT, "comment", FALSE, FALSE }, + { SCE_ERLANG_VARIABLE, "variable", FALSE, FALSE }, + { SCE_ERLANG_NUMBER, "number", FALSE, FALSE }, + { SCE_ERLANG_KEYWORD, "keyword", FALSE, FALSE }, + { SCE_ERLANG_STRING, "string", FALSE, FALSE }, + { SCE_ERLANG_OPERATOR, "operator", FALSE, FALSE }, + { SCE_ERLANG_ATOM, "atom", FALSE, FALSE }, + { SCE_ERLANG_FUNCTION_NAME, "function_name", FALSE, FALSE }, + { SCE_ERLANG_CHARACTER, "character", FALSE, FALSE }, + { SCE_ERLANG_MACRO, "macro", FALSE, FALSE }, + { SCE_ERLANG_RECORD, "record", FALSE, FALSE }, + { SCE_ERLANG_PREPROC, "preproc", FALSE, FALSE }, + { SCE_ERLANG_NODE_NAME, "node_name", FALSE, FALSE }, + { SCE_ERLANG_COMMENT_FUNCTION, "comment_function", FALSE, FALSE }, + { SCE_ERLANG_COMMENT_MODULE, "comment_module", FALSE, FALSE }, + { SCE_ERLANG_COMMENT_DOC, "comment_doc", FALSE, FALSE }, + { SCE_ERLANG_COMMENT_DOC_MACRO, "comment_doc_macro", FALSE, FALSE }, + { SCE_ERLANG_ATOM_QUOTED, "atom_quoted", FALSE, FALSE }, + { SCE_ERLANG_MACRO_QUOTED, "macro_quoted", FALSE, FALSE }, + { SCE_ERLANG_RECORD_QUOTED, "record_quoted", FALSE, FALSE }, + { SCE_ERLANG_NODE_NAME_QUOTED, "node_name_quoted", FALSE, FALSE }, + { SCE_ERLANG_BIFS, "bifs", FALSE, FALSE }, + { SCE_ERLANG_MODULES, "modules", FALSE, FALSE }, + { SCE_ERLANG_MODULES_ATT, "modules_att", FALSE, FALSE }, + { SCE_ERLANG_UNKNOWN, "unknown", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_ERLANG[] = { @@ -622,21 +623,21 @@ static const HLKeyword highlighting_keywords_ERLANG[] = #define highlighting_lexer_F77 SCLEX_F77 static const HLStyle highlighting_styles_F77[] = { - { SCE_F_DEFAULT, "default", FALSE }, - { SCE_F_COMMENT, "comment", FALSE }, - { SCE_F_NUMBER, "number", FALSE }, - { SCE_F_STRING1, "string", FALSE }, - { SCE_F_OPERATOR, "operator", FALSE }, - { SCE_F_IDENTIFIER, "identifier", FALSE }, - { SCE_F_STRING2, "string2", FALSE }, - { SCE_F_WORD, "word", FALSE }, - { SCE_F_WORD2, "word2", FALSE }, - { SCE_F_WORD3, "word3", FALSE }, - { SCE_F_PREPROCESSOR, "preprocessor", FALSE }, - { SCE_F_OPERATOR2, "operator2", FALSE }, - { SCE_F_CONTINUATION, "continuation", FALSE }, - { SCE_F_STRINGEOL, "stringeol", FALSE }, - { SCE_F_LABEL, "label", FALSE } + { SCE_F_DEFAULT, "default", FALSE, FALSE }, + { SCE_F_COMMENT, "comment", FALSE, FALSE }, + { SCE_F_NUMBER, "number", FALSE, FALSE }, + { SCE_F_STRING1, "string", FALSE, FALSE }, + { SCE_F_OPERATOR, "operator", FALSE, FALSE }, + { SCE_F_IDENTIFIER, "identifier", FALSE, FALSE }, + { SCE_F_STRING2, "string2", FALSE, FALSE }, + { SCE_F_WORD, "word", FALSE, FALSE }, + { SCE_F_WORD2, "word2", FALSE, FALSE }, + { SCE_F_WORD3, "word3", FALSE, FALSE }, + { SCE_F_PREPROCESSOR, "preprocessor", FALSE, FALSE }, + { SCE_F_OPERATOR2, "operator2", FALSE, FALSE }, + { SCE_F_CONTINUATION, "continuation", FALSE, FALSE }, + { SCE_F_STRINGEOL, "stringeol", FALSE, FALSE }, + { SCE_F_LABEL, "label", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_F77[] = { @@ -651,18 +652,18 @@ static const HLKeyword highlighting_keywords_F77[] = #define highlighting_lexer_FORTH SCLEX_FORTH static const HLStyle highlighting_styles_FORTH[] = { - { SCE_FORTH_DEFAULT, "default", FALSE }, - { SCE_FORTH_COMMENT, "comment", FALSE }, - { SCE_FORTH_COMMENT_ML, "commentml", FALSE }, - { SCE_FORTH_IDENTIFIER, "identifier", FALSE }, - { SCE_FORTH_CONTROL, "control", FALSE }, - { SCE_FORTH_KEYWORD, "keyword", FALSE }, - { SCE_FORTH_DEFWORD, "defword", FALSE }, - { SCE_FORTH_PREWORD1, "preword1", FALSE }, - { SCE_FORTH_PREWORD2, "preword2", FALSE }, - { SCE_FORTH_NUMBER, "number", FALSE }, - { SCE_FORTH_STRING, "string", FALSE }, - { SCE_FORTH_LOCALE, "locale", FALSE } + { SCE_FORTH_DEFAULT, "default", FALSE, FALSE }, + { SCE_FORTH_COMMENT, "comment", FALSE, FALSE }, + { SCE_FORTH_COMMENT_ML, "commentml", FALSE, FALSE }, + { SCE_FORTH_IDENTIFIER, "identifier", FALSE, FALSE }, + { SCE_FORTH_CONTROL, "control", FALSE, FALSE }, + { SCE_FORTH_KEYWORD, "keyword", FALSE, FALSE }, + { SCE_FORTH_DEFWORD, "defword", FALSE, FALSE }, + { SCE_FORTH_PREWORD1, "preword1", FALSE, FALSE }, + { SCE_FORTH_PREWORD2, "preword2", FALSE, FALSE }, + { SCE_FORTH_NUMBER, "number", FALSE, FALSE }, + { SCE_FORTH_STRING, "string", FALSE, FALSE }, + { SCE_FORTH_LOCALE, "locale", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_FORTH[] = { @@ -688,23 +689,23 @@ static const HLKeyword highlighting_keywords_FORTH[] = #define highlighting_lexer_GDSCRIPT SCLEX_GDSCRIPT static const HLStyle highlighting_styles_GDSCRIPT[] = { - { SCE_GD_DEFAULT, "default", FALSE }, - { SCE_GD_COMMENTLINE, "commentline", FALSE }, - { SCE_GD_NUMBER, "number", FALSE }, - { SCE_GD_STRING, "string", FALSE }, - { SCE_GD_CHARACTER, "character", FALSE }, - { SCE_GD_WORD, "word", FALSE }, - { SCE_GD_TRIPLE, "triple", FALSE }, - { SCE_GD_TRIPLEDOUBLE, "tripledouble", FALSE }, - { SCE_GD_CLASSNAME, "classname", FALSE }, - { SCE_GD_FUNCNAME, "funcname", FALSE }, - { SCE_GD_OPERATOR, "operator", FALSE }, - { SCE_GD_IDENTIFIER, "identifier", FALSE }, - { SCE_GD_COMMENTBLOCK, "commentblock", FALSE }, - { SCE_GD_STRINGEOL, "stringeol", FALSE }, - { SCE_GD_WORD2, "word2", FALSE }, - { SCE_GD_ANNOTATION, "annotation", FALSE }, - { SCE_GD_NODEPATH, "notepath", FALSE } + { SCE_GD_DEFAULT, "default", FALSE, FALSE }, + { SCE_GD_COMMENTLINE, "commentline", FALSE, FALSE }, + { SCE_GD_NUMBER, "number", FALSE, FALSE }, + { SCE_GD_STRING, "string", FALSE, FALSE }, + { SCE_GD_CHARACTER, "character", FALSE, FALSE }, + { SCE_GD_WORD, "word", FALSE, FALSE }, + { SCE_GD_TRIPLE, "triple", FALSE, FALSE }, + { SCE_GD_TRIPLEDOUBLE, "tripledouble", FALSE, FALSE }, + { SCE_GD_CLASSNAME, "classname", FALSE, FALSE }, + { SCE_GD_FUNCNAME, "funcname", FALSE, FALSE }, + { SCE_GD_OPERATOR, "operator", FALSE, FALSE }, + { SCE_GD_IDENTIFIER, "identifier", FALSE, TRUE }, + { SCE_GD_COMMENTBLOCK, "commentblock", FALSE, FALSE }, + { SCE_GD_STRINGEOL, "stringeol", FALSE, FALSE }, + { SCE_GD_WORD2, "word2", FALSE, FALSE }, + { SCE_GD_ANNOTATION, "annotation", FALSE, FALSE }, + { SCE_GD_NODEPATH, "notepath", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_GDSCRIPT[] = { @@ -725,29 +726,29 @@ static const HLKeyword highlighting_keywords_GDSCRIPT[] = #define highlighting_lexer_HASKELL SCLEX_HASKELL static const HLStyle highlighting_styles_HASKELL[] = { - { SCE_HA_DEFAULT, "default", FALSE }, - { SCE_HA_COMMENTLINE, "commentline", FALSE }, - { SCE_HA_COMMENTBLOCK, "commentblock", FALSE }, - { SCE_HA_COMMENTBLOCK2, "commentblock2", FALSE }, - { SCE_HA_COMMENTBLOCK3, "commentblock3", FALSE }, - { SCE_HA_NUMBER, "number", FALSE }, - { SCE_HA_KEYWORD, "keyword", FALSE }, - { SCE_HA_IMPORT, "import", FALSE }, - { SCE_HA_STRING, "string", FALSE }, - { SCE_HA_CHARACTER, "character", FALSE }, - { SCE_HA_CLASS, "class", FALSE }, - { SCE_HA_OPERATOR, "operator", FALSE }, - { SCE_HA_IDENTIFIER, "identifier", FALSE }, - { SCE_HA_INSTANCE, "instance", FALSE }, - { SCE_HA_CAPITAL, "capital", FALSE }, - { SCE_HA_MODULE, "module", FALSE }, - { SCE_HA_DATA, "data", FALSE }, - { SCE_HA_PRAGMA, "pragma", FALSE }, - { SCE_HA_PREPROCESSOR, "preprocessor", FALSE }, - { SCE_HA_STRINGEOL, "stringeol", FALSE }, - { SCE_HA_RESERVED_OPERATOR, "reserved_operator", FALSE }, - { SCE_HA_LITERATE_COMMENT, "literate_comment", FALSE }, - { SCE_HA_LITERATE_CODEDELIM, "literate_codedelim", FALSE } + { SCE_HA_DEFAULT, "default", FALSE, FALSE }, + { SCE_HA_COMMENTLINE, "commentline", FALSE, FALSE }, + { SCE_HA_COMMENTBLOCK, "commentblock", FALSE, FALSE }, + { SCE_HA_COMMENTBLOCK2, "commentblock2", FALSE, FALSE }, + { SCE_HA_COMMENTBLOCK3, "commentblock3", FALSE, FALSE }, + { SCE_HA_NUMBER, "number", FALSE, FALSE }, + { SCE_HA_KEYWORD, "keyword", FALSE, FALSE }, + { SCE_HA_IMPORT, "import", FALSE, FALSE }, + { SCE_HA_STRING, "string", FALSE, FALSE }, + { SCE_HA_CHARACTER, "character", FALSE, FALSE }, + { SCE_HA_CLASS, "class", FALSE, FALSE }, + { SCE_HA_OPERATOR, "operator", FALSE, FALSE }, + { SCE_HA_IDENTIFIER, "identifier", FALSE, FALSE }, + { SCE_HA_INSTANCE, "instance", FALSE, FALSE }, + { SCE_HA_CAPITAL, "capital", FALSE, FALSE }, + { SCE_HA_MODULE, "module", FALSE, FALSE }, + { SCE_HA_DATA, "data", FALSE, FALSE }, + { SCE_HA_PRAGMA, "pragma", FALSE, FALSE }, + { SCE_HA_PREPROCESSOR, "preprocessor", FALSE, FALSE }, + { SCE_HA_STRINGEOL, "stringeol", FALSE, FALSE }, + { SCE_HA_RESERVED_OPERATOR, "reserved_operator", FALSE, FALSE }, + { SCE_HA_LITERATE_COMMENT, "literate_comment", FALSE, FALSE }, + { SCE_HA_LITERATE_CODEDELIM, "literate_codedelim", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_HASKELL[] = { @@ -774,132 +775,132 @@ static const HLKeyword highlighting_keywords_HAXE[] = #define highlighting_lexer_HTML SCLEX_HTML static const HLStyle highlighting_styles_HTML[] = { - { SCE_H_DEFAULT, "html_default", FALSE }, - { SCE_H_TAG, "html_tag", FALSE }, - { SCE_H_TAGUNKNOWN, "html_tagunknown", FALSE }, - { SCE_H_ATTRIBUTE, "html_attribute", FALSE }, - { SCE_H_ATTRIBUTEUNKNOWN, "html_attributeunknown", FALSE }, - { SCE_H_NUMBER, "html_number", FALSE }, - { SCE_H_DOUBLESTRING, "html_doublestring", FALSE }, - { SCE_H_SINGLESTRING, "html_singlestring", FALSE }, - { SCE_H_OTHER, "html_other", FALSE }, - { SCE_H_COMMENT, "html_comment", FALSE }, - { SCE_H_ENTITY, "html_entity", FALSE }, - { SCE_H_TAGEND, "html_tagend", FALSE }, - { SCE_H_XMLSTART, "html_xmlstart", TRUE }, - { SCE_H_XMLEND, "html_xmlend", FALSE }, - { SCE_H_SCRIPT, "html_script", FALSE }, - { SCE_H_ASP, "html_asp", TRUE }, - { SCE_H_ASPAT, "html_aspat", TRUE }, - { SCE_H_CDATA, "html_cdata", FALSE }, - { SCE_H_QUESTION, "html_question", FALSE }, - { SCE_H_VALUE, "html_value", FALSE }, - { SCE_H_XCCOMMENT, "html_xccomment", FALSE }, - - { SCE_H_SGML_DEFAULT, "sgml_default", FALSE }, - { SCE_H_SGML_COMMENT, "sgml_comment", FALSE }, - { SCE_H_SGML_SPECIAL, "sgml_special", FALSE }, - { SCE_H_SGML_COMMAND, "sgml_command", FALSE }, - { SCE_H_SGML_DOUBLESTRING, "sgml_doublestring", FALSE }, - { SCE_H_SGML_SIMPLESTRING, "sgml_simplestring", FALSE }, - { SCE_H_SGML_1ST_PARAM, "sgml_1st_param", FALSE }, - { SCE_H_SGML_ENTITY, "sgml_entity", FALSE }, - { SCE_H_SGML_BLOCK_DEFAULT, "sgml_block_default", FALSE }, - { SCE_H_SGML_1ST_PARAM_COMMENT, "sgml_1st_param_comment", FALSE }, - { SCE_H_SGML_ERROR, "sgml_error", FALSE }, + { SCE_H_DEFAULT, "html_default", FALSE, FALSE }, + { SCE_H_TAG, "html_tag", FALSE, FALSE }, + { SCE_H_TAGUNKNOWN, "html_tagunknown", FALSE, FALSE }, + { SCE_H_ATTRIBUTE, "html_attribute", FALSE, FALSE }, + { SCE_H_ATTRIBUTEUNKNOWN, "html_attributeunknown", FALSE, FALSE }, + { SCE_H_NUMBER, "html_number", FALSE, FALSE }, + { SCE_H_DOUBLESTRING, "html_doublestring", FALSE, FALSE }, + { SCE_H_SINGLESTRING, "html_singlestring", FALSE, FALSE }, + { SCE_H_OTHER, "html_other", FALSE, FALSE }, + { SCE_H_COMMENT, "html_comment", FALSE, FALSE }, + { SCE_H_ENTITY, "html_entity", FALSE, FALSE }, + { SCE_H_TAGEND, "html_tagend", FALSE, FALSE }, + { SCE_H_XMLSTART, "html_xmlstart", TRUE, FALSE }, + { SCE_H_XMLEND, "html_xmlend", FALSE, FALSE }, + { SCE_H_SCRIPT, "html_script", FALSE, FALSE }, + { SCE_H_ASP, "html_asp", TRUE, FALSE }, + { SCE_H_ASPAT, "html_aspat", TRUE, FALSE }, + { SCE_H_CDATA, "html_cdata", FALSE, FALSE }, + { SCE_H_QUESTION, "html_question", FALSE, FALSE }, + { SCE_H_VALUE, "html_value", FALSE, FALSE }, + { SCE_H_XCCOMMENT, "html_xccomment", FALSE, FALSE }, + + { SCE_H_SGML_DEFAULT, "sgml_default", FALSE, FALSE }, + { SCE_H_SGML_COMMENT, "sgml_comment", FALSE, FALSE }, + { SCE_H_SGML_SPECIAL, "sgml_special", FALSE, FALSE }, + { SCE_H_SGML_COMMAND, "sgml_command", FALSE, FALSE }, + { SCE_H_SGML_DOUBLESTRING, "sgml_doublestring", FALSE, FALSE }, + { SCE_H_SGML_SIMPLESTRING, "sgml_simplestring", FALSE, FALSE }, + { SCE_H_SGML_1ST_PARAM, "sgml_1st_param", FALSE, FALSE }, + { SCE_H_SGML_ENTITY, "sgml_entity", FALSE, FALSE }, + { SCE_H_SGML_BLOCK_DEFAULT, "sgml_block_default", FALSE, FALSE }, + { SCE_H_SGML_1ST_PARAM_COMMENT, "sgml_1st_param_comment", FALSE, FALSE }, + { SCE_H_SGML_ERROR, "sgml_error", FALSE, FALSE }, /* embedded JavaScript */ - { SCE_HJ_START, "jscript_start", FALSE }, - { SCE_HJ_DEFAULT, "jscript_default", FALSE }, - { SCE_HJ_COMMENT, "jscript_comment", FALSE }, - { SCE_HJ_COMMENTLINE, "jscript_commentline", FALSE }, - { SCE_HJ_COMMENTDOC, "jscript_commentdoc", FALSE }, - { SCE_HJ_NUMBER, "jscript_number", FALSE }, - { SCE_HJ_WORD, "jscript_word", FALSE }, - { SCE_HJ_KEYWORD, "jscript_keyword", FALSE }, - { SCE_HJ_DOUBLESTRING, "jscript_doublestring", FALSE }, - { SCE_HJ_SINGLESTRING, "jscript_singlestring", FALSE }, - { SCE_HJ_SYMBOLS, "jscript_symbols", FALSE }, - { SCE_HJ_STRINGEOL, "jscript_stringeol", FALSE }, - { SCE_HJ_REGEX, "jscript_regex", FALSE }, + { SCE_HJ_START, "jscript_start", FALSE, FALSE }, + { SCE_HJ_DEFAULT, "jscript_default", FALSE, FALSE }, + { SCE_HJ_COMMENT, "jscript_comment", FALSE, FALSE }, + { SCE_HJ_COMMENTLINE, "jscript_commentline", FALSE, FALSE }, + { SCE_HJ_COMMENTDOC, "jscript_commentdoc", FALSE, FALSE }, + { SCE_HJ_NUMBER, "jscript_number", FALSE, FALSE }, + { SCE_HJ_WORD, "jscript_word", FALSE, FALSE }, + { SCE_HJ_KEYWORD, "jscript_keyword", FALSE, FALSE }, + { SCE_HJ_DOUBLESTRING, "jscript_doublestring", FALSE, FALSE }, + { SCE_HJ_SINGLESTRING, "jscript_singlestring", FALSE, FALSE }, + { SCE_HJ_SYMBOLS, "jscript_symbols", FALSE, FALSE }, + { SCE_HJ_STRINGEOL, "jscript_stringeol", FALSE, FALSE }, + { SCE_HJ_REGEX, "jscript_regex", FALSE, FALSE }, /* for HB, VBScript?, use the same styles as for JavaScript */ - { SCE_HB_START, "jscript_start", FALSE }, - { SCE_HB_DEFAULT, "jscript_default", FALSE }, - { SCE_HB_COMMENTLINE, "jscript_commentline", FALSE }, - { SCE_HB_NUMBER, "jscript_number", FALSE }, - { SCE_HB_WORD, "jscript_keyword", FALSE }, /* keywords */ - { SCE_HB_STRING, "jscript_doublestring", FALSE }, - { SCE_HB_IDENTIFIER, "jscript_symbols", FALSE }, - { SCE_HB_STRINGEOL, "jscript_stringeol", FALSE }, + { SCE_HB_START, "jscript_start", FALSE, FALSE }, + { SCE_HB_DEFAULT, "jscript_default", FALSE, FALSE }, + { SCE_HB_COMMENTLINE, "jscript_commentline", FALSE, FALSE }, + { SCE_HB_NUMBER, "jscript_number", FALSE, FALSE }, + { SCE_HB_WORD, "jscript_keyword", FALSE, FALSE }, /* keywords */ + { SCE_HB_STRING, "jscript_doublestring", FALSE, FALSE }, + { SCE_HB_IDENTIFIER, "jscript_symbols", FALSE, FALSE }, + { SCE_HB_STRINGEOL, "jscript_stringeol", FALSE, FALSE }, /* for HBA, VBScript?, use the same styles as for JavaScript */ - { SCE_HBA_START, "jscript_start", FALSE }, - { SCE_HBA_DEFAULT, "jscript_default", FALSE }, - { SCE_HBA_COMMENTLINE, "jscript_commentline", FALSE }, - { SCE_HBA_NUMBER, "jscript_number", FALSE }, - { SCE_HBA_WORD, "jscript_keyword", FALSE }, /* keywords */ - { SCE_HBA_STRING, "jscript_doublestring", FALSE }, - { SCE_HBA_IDENTIFIER, "jscript_symbols", FALSE }, - { SCE_HBA_STRINGEOL, "jscript_stringeol", FALSE }, + { SCE_HBA_START, "jscript_start", FALSE, FALSE }, + { SCE_HBA_DEFAULT, "jscript_default", FALSE, FALSE }, + { SCE_HBA_COMMENTLINE, "jscript_commentline", FALSE, FALSE }, + { SCE_HBA_NUMBER, "jscript_number", FALSE, FALSE }, + { SCE_HBA_WORD, "jscript_keyword", FALSE, FALSE }, /* keywords */ + { SCE_HBA_STRING, "jscript_doublestring", FALSE, FALSE }, + { SCE_HBA_IDENTIFIER, "jscript_symbols", FALSE, FALSE }, + { SCE_HBA_STRINGEOL, "jscript_stringeol", FALSE, FALSE }, /* for HJA, ASP Javascript, use the same styles as for JavaScript */ - { SCE_HJA_START, "jscript_start", FALSE }, - { SCE_HJA_DEFAULT, "jscript_default", FALSE }, - { SCE_HJA_COMMENT, "jscript_comment", FALSE }, - { SCE_HJA_COMMENTLINE, "jscript_commentline", FALSE }, - { SCE_HJA_COMMENTDOC, "jscript_commentdoc", FALSE }, - { SCE_HJA_NUMBER, "jscript_number", FALSE }, - { SCE_HJA_WORD, "jscript_word", FALSE }, - { SCE_HJA_KEYWORD, "jscript_keyword", FALSE }, - { SCE_HJA_DOUBLESTRING, "jscript_doublestring", FALSE }, - { SCE_HJA_SINGLESTRING, "jscript_singlestring", FALSE }, - { SCE_HJA_SYMBOLS, "jscript_symbols", FALSE }, - { SCE_HJA_STRINGEOL, "jscript_stringeol", FALSE }, - { SCE_HJA_REGEX, "jscript_regex", FALSE }, + { SCE_HJA_START, "jscript_start", FALSE, FALSE }, + { SCE_HJA_DEFAULT, "jscript_default", FALSE, FALSE }, + { SCE_HJA_COMMENT, "jscript_comment", FALSE, FALSE }, + { SCE_HJA_COMMENTLINE, "jscript_commentline", FALSE, FALSE }, + { SCE_HJA_COMMENTDOC, "jscript_commentdoc", FALSE, FALSE }, + { SCE_HJA_NUMBER, "jscript_number", FALSE, FALSE }, + { SCE_HJA_WORD, "jscript_word", FALSE, FALSE }, + { SCE_HJA_KEYWORD, "jscript_keyword", FALSE, FALSE }, + { SCE_HJA_DOUBLESTRING, "jscript_doublestring", FALSE, FALSE }, + { SCE_HJA_SINGLESTRING, "jscript_singlestring", FALSE, FALSE }, + { SCE_HJA_SYMBOLS, "jscript_symbols", FALSE, FALSE }, + { SCE_HJA_STRINGEOL, "jscript_stringeol", FALSE, FALSE }, + { SCE_HJA_REGEX, "jscript_regex", FALSE, FALSE }, /* embedded Python */ - { SCE_HP_START, "jscript_start", FALSE }, - { SCE_HP_DEFAULT, "python_default", FALSE }, - { SCE_HP_COMMENTLINE, "python_commentline", FALSE }, - { SCE_HP_NUMBER, "python_number", FALSE }, - { SCE_HP_STRING, "python_string", FALSE }, - { SCE_HP_CHARACTER, "python_character", FALSE }, - { SCE_HP_WORD, "python_word", FALSE }, - { SCE_HP_TRIPLE, "python_triple", FALSE }, - { SCE_HP_TRIPLEDOUBLE, "python_tripledouble", FALSE }, - { SCE_HP_CLASSNAME, "python_classname", FALSE }, - { SCE_HP_DEFNAME, "python_defname", FALSE }, - { SCE_HP_OPERATOR, "python_operator", FALSE }, - { SCE_HP_IDENTIFIER, "python_identifier", FALSE }, + { SCE_HP_START, "jscript_start", FALSE, FALSE }, + { SCE_HP_DEFAULT, "python_default", FALSE, FALSE }, + { SCE_HP_COMMENTLINE, "python_commentline", FALSE, FALSE }, + { SCE_HP_NUMBER, "python_number", FALSE, FALSE }, + { SCE_HP_STRING, "python_string", FALSE, FALSE }, + { SCE_HP_CHARACTER, "python_character", FALSE, FALSE }, + { SCE_HP_WORD, "python_word", FALSE, FALSE }, + { SCE_HP_TRIPLE, "python_triple", FALSE, FALSE }, + { SCE_HP_TRIPLEDOUBLE, "python_tripledouble", FALSE, FALSE }, + { SCE_HP_CLASSNAME, "python_classname", FALSE, FALSE }, + { SCE_HP_DEFNAME, "python_defname", FALSE, FALSE }, + { SCE_HP_OPERATOR, "python_operator", FALSE, FALSE }, + { SCE_HP_IDENTIFIER, "python_identifier", FALSE, FALSE }, /* for embedded HPA (what is this?) we use the Python styles */ - { SCE_HPA_START, "jscript_start", FALSE }, - { SCE_HPA_DEFAULT, "python_default", FALSE }, - { SCE_HPA_COMMENTLINE, "python_commentline", FALSE }, - { SCE_HPA_NUMBER, "python_number", FALSE }, - { SCE_HPA_STRING, "python_string", FALSE }, - { SCE_HPA_CHARACTER, "python_character", FALSE }, - { SCE_HPA_WORD, "python_word", FALSE }, - { SCE_HPA_TRIPLE, "python_triple", FALSE }, - { SCE_HPA_TRIPLEDOUBLE, "python_tripledouble", FALSE }, - { SCE_HPA_CLASSNAME, "python_classname", FALSE }, - { SCE_HPA_DEFNAME, "python_defname", FALSE }, - { SCE_HPA_OPERATOR, "python_operator", FALSE }, - { SCE_HPA_IDENTIFIER, "python_identifier", FALSE }, + { SCE_HPA_START, "jscript_start", FALSE, FALSE }, + { SCE_HPA_DEFAULT, "python_default", FALSE, FALSE }, + { SCE_HPA_COMMENTLINE, "python_commentline", FALSE, FALSE }, + { SCE_HPA_NUMBER, "python_number", FALSE, FALSE }, + { SCE_HPA_STRING, "python_string", FALSE, FALSE }, + { SCE_HPA_CHARACTER, "python_character", FALSE, FALSE }, + { SCE_HPA_WORD, "python_word", FALSE, FALSE }, + { SCE_HPA_TRIPLE, "python_triple", FALSE, FALSE }, + { SCE_HPA_TRIPLEDOUBLE, "python_tripledouble", FALSE, FALSE }, + { SCE_HPA_CLASSNAME, "python_classname", FALSE, FALSE }, + { SCE_HPA_DEFNAME, "python_defname", FALSE, FALSE }, + { SCE_HPA_OPERATOR, "python_operator", FALSE, FALSE }, + { SCE_HPA_IDENTIFIER, "python_identifier", FALSE, FALSE }, /* PHP */ - { SCE_HPHP_DEFAULT, "php_default", FALSE }, - { SCE_HPHP_SIMPLESTRING, "php_simplestring", FALSE }, - { SCE_HPHP_HSTRING, "php_hstring", FALSE }, - { SCE_HPHP_NUMBER, "php_number", FALSE }, - { SCE_HPHP_WORD, "php_word", FALSE }, - { SCE_HPHP_VARIABLE, "php_variable", FALSE }, - { SCE_HPHP_COMMENT, "php_comment", FALSE }, - { SCE_HPHP_COMMENTLINE, "php_commentline", FALSE }, - { SCE_HPHP_OPERATOR, "php_operator", FALSE }, - { SCE_HPHP_HSTRING_VARIABLE, "php_hstring_variable", FALSE }, - { SCE_HPHP_COMPLEX_VARIABLE, "php_complex_variable", FALSE } + { SCE_HPHP_DEFAULT, "php_default", FALSE, FALSE }, + { SCE_HPHP_SIMPLESTRING, "php_simplestring", FALSE, FALSE }, + { SCE_HPHP_HSTRING, "php_hstring", FALSE, FALSE }, + { SCE_HPHP_NUMBER, "php_number", FALSE, FALSE }, + { SCE_HPHP_WORD, "php_word", FALSE, FALSE }, + { SCE_HPHP_VARIABLE, "php_variable", FALSE, FALSE }, + { SCE_HPHP_COMMENT, "php_comment", FALSE, FALSE }, + { SCE_HPHP_COMMENTLINE, "php_commentline", FALSE, FALSE }, + { SCE_HPHP_OPERATOR, "php_operator", FALSE, FALSE }, + { SCE_HPHP_HSTRING_VARIABLE, "php_hstring_variable", FALSE, FALSE }, + { SCE_HPHP_COMPLEX_VARIABLE, "php_complex_variable", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_HTML[] = { @@ -946,28 +947,28 @@ static const HLKeyword highlighting_keywords_JS[] = #define highlighting_lexer_JULIA SCLEX_JULIA static const HLStyle highlighting_styles_JULIA[] = { - { SCE_JULIA_DEFAULT, "default", FALSE }, - { SCE_JULIA_COMMENT, "comment", FALSE }, - { SCE_JULIA_NUMBER, "number", FALSE }, - { SCE_JULIA_KEYWORD1, "keyword1", FALSE }, - { SCE_JULIA_KEYWORD2, "keyword2", FALSE }, - { SCE_JULIA_KEYWORD3, "keyword3", FALSE }, - { SCE_JULIA_CHAR, "char", FALSE }, - { SCE_JULIA_OPERATOR, "operator", FALSE }, - { SCE_JULIA_BRACKET, "bracket", FALSE }, - { SCE_JULIA_IDENTIFIER, "identifier", FALSE }, - { SCE_JULIA_STRING, "string", FALSE }, - { SCE_JULIA_SYMBOL, "symbol", FALSE }, - { SCE_JULIA_MACRO, "macro", FALSE }, - { SCE_JULIA_STRINGINTERP, "stringinterp", FALSE }, - { SCE_JULIA_DOCSTRING, "docstring", FALSE }, - { SCE_JULIA_STRINGLITERAL, "stringliteral", FALSE }, - { SCE_JULIA_COMMAND, "command", FALSE }, - { SCE_JULIA_COMMANDLITERAL, "commandliteral", FALSE }, - { SCE_JULIA_TYPEANNOT, "typeannotation", FALSE }, - { SCE_JULIA_LEXERROR, "lexerror", FALSE }, - { SCE_JULIA_KEYWORD4, "keyword4", FALSE }, - { SCE_JULIA_TYPEOPERATOR, "typeoperator", FALSE }, + { SCE_JULIA_DEFAULT, "default", FALSE, FALSE }, + { SCE_JULIA_COMMENT, "comment", FALSE, FALSE }, + { SCE_JULIA_NUMBER, "number", FALSE, FALSE }, + { SCE_JULIA_KEYWORD1, "keyword1", FALSE, FALSE }, + { SCE_JULIA_KEYWORD2, "keyword2", FALSE, FALSE }, + { SCE_JULIA_KEYWORD3, "keyword3", FALSE, FALSE }, + { SCE_JULIA_CHAR, "char", FALSE, FALSE }, + { SCE_JULIA_OPERATOR, "operator", FALSE, FALSE }, + { SCE_JULIA_BRACKET, "bracket", FALSE, FALSE }, + { SCE_JULIA_IDENTIFIER, "identifier", FALSE, FALSE }, + { SCE_JULIA_STRING, "string", FALSE, FALSE }, + { SCE_JULIA_SYMBOL, "symbol", FALSE, FALSE }, + { SCE_JULIA_MACRO, "macro", FALSE, FALSE }, + { SCE_JULIA_STRINGINTERP, "stringinterp", FALSE, FALSE }, + { SCE_JULIA_DOCSTRING, "docstring", FALSE, FALSE }, + { SCE_JULIA_STRINGLITERAL, "stringliteral", FALSE, FALSE }, + { SCE_JULIA_COMMAND, "command", FALSE, FALSE }, + { SCE_JULIA_COMMANDLITERAL, "commandliteral", FALSE, FALSE }, + { SCE_JULIA_TYPEANNOT, "typeannotation", FALSE, FALSE }, + { SCE_JULIA_LEXERROR, "lexerror", FALSE, FALSE }, + { SCE_JULIA_KEYWORD4, "keyword4", FALSE, FALSE }, + { SCE_JULIA_TYPEOPERATOR, "typeoperator", FALSE, FALSE }, }; static const HLKeyword highlighting_keywords_JULIA[] = { @@ -983,19 +984,19 @@ static const HLKeyword highlighting_keywords_JULIA[] = #define highlighting_lexer_LATEX SCLEX_LATEX static const HLStyle highlighting_styles_LATEX[] = { - { SCE_L_DEFAULT, "default", FALSE }, - { SCE_L_COMMAND, "command", FALSE }, - { SCE_L_TAG, "tag", FALSE }, - { SCE_L_MATH, "math", FALSE }, - { SCE_L_COMMENT, "comment", FALSE }, - { SCE_L_TAG2, "tag2", FALSE }, - { SCE_L_MATH2, "math2", FALSE }, - { SCE_L_COMMENT2, "comment2", FALSE }, - { SCE_L_VERBATIM, "verbatim", FALSE }, - { SCE_L_SHORTCMD, "shortcmd", FALSE }, - { SCE_L_SPECIAL, "special", FALSE }, - { SCE_L_CMDOPT, "cmdopt", FALSE }, - { SCE_L_ERROR, "error", FALSE } + { SCE_L_DEFAULT, "default", FALSE, FALSE }, + { SCE_L_COMMAND, "command", FALSE, FALSE }, + { SCE_L_TAG, "tag", FALSE, FALSE }, + { SCE_L_MATH, "math", FALSE, FALSE }, + { SCE_L_COMMENT, "comment", FALSE, FALSE }, + { SCE_L_TAG2, "tag2", FALSE, FALSE }, + { SCE_L_MATH2, "math2", FALSE, FALSE }, + { SCE_L_COMMENT2, "comment2", FALSE, FALSE }, + { SCE_L_VERBATIM, "verbatim", FALSE, FALSE }, + { SCE_L_SHORTCMD, "shortcmd", FALSE, FALSE }, + { SCE_L_SPECIAL, "special", FALSE, FALSE }, + { SCE_L_CMDOPT, "cmdopt", FALSE, FALSE }, + { SCE_L_ERROR, "error", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_LATEX[] = { @@ -1008,18 +1009,18 @@ static const HLKeyword highlighting_keywords_LATEX[] = #define highlighting_lexer_LISP SCLEX_LISP static const HLStyle highlighting_styles_LISP[] = { - { SCE_LISP_DEFAULT, "default", FALSE }, - { SCE_LISP_COMMENT, "comment", FALSE }, - { SCE_LISP_MULTI_COMMENT, "multicomment", FALSE }, - { SCE_LISP_NUMBER, "number", FALSE }, - { SCE_LISP_KEYWORD, "keyword", FALSE }, - { SCE_LISP_SYMBOL, "symbol", FALSE }, - { SCE_LISP_STRING, "string", FALSE }, - { SCE_LISP_STRINGEOL, "stringeol", FALSE }, - { SCE_LISP_IDENTIFIER, "identifier", FALSE }, - { SCE_LISP_OPERATOR, "operator", FALSE }, - { SCE_LISP_SPECIAL, "special", FALSE }, - { SCE_LISP_KEYWORD_KW, "keywordkw", FALSE } + { SCE_LISP_DEFAULT, "default", FALSE, FALSE }, + { SCE_LISP_COMMENT, "comment", FALSE, FALSE }, + { SCE_LISP_MULTI_COMMENT, "multicomment", FALSE, FALSE }, + { SCE_LISP_NUMBER, "number", FALSE, FALSE }, + { SCE_LISP_KEYWORD, "keyword", FALSE, FALSE }, + { SCE_LISP_SYMBOL, "symbol", FALSE, FALSE }, + { SCE_LISP_STRING, "string", FALSE, FALSE }, + { SCE_LISP_STRINGEOL, "stringeol", FALSE, FALSE }, + { SCE_LISP_IDENTIFIER, "identifier", FALSE, FALSE }, + { SCE_LISP_OPERATOR, "operator", FALSE, FALSE }, + { SCE_LISP_SPECIAL, "special", FALSE, FALSE }, + { SCE_LISP_KEYWORD_KW, "keywordkw", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_LISP[] = { @@ -1033,27 +1034,27 @@ static const HLKeyword highlighting_keywords_LISP[] = #define highlighting_lexer_LUA SCLEX_LUA static const HLStyle highlighting_styles_LUA[] = { - { SCE_LUA_DEFAULT, "default", FALSE }, - { SCE_LUA_COMMENT, "comment", FALSE }, - { SCE_LUA_COMMENTLINE, "commentline", FALSE }, - { SCE_LUA_COMMENTDOC, "commentdoc", FALSE }, - { SCE_LUA_NUMBER, "number", FALSE }, - { SCE_LUA_WORD, "word", FALSE }, - { SCE_LUA_STRING, "string", FALSE }, - { SCE_LUA_CHARACTER, "character", FALSE }, - { SCE_LUA_LITERALSTRING, "literalstring", FALSE }, - { SCE_LUA_PREPROCESSOR, "preprocessor", FALSE }, - { SCE_LUA_OPERATOR, "operator", FALSE }, - { SCE_LUA_IDENTIFIER, "identifier", FALSE }, - { SCE_LUA_STRINGEOL, "stringeol", FALSE }, - { SCE_LUA_WORD2, "function_basic", FALSE }, - { SCE_LUA_WORD3, "function_other", FALSE }, - { SCE_LUA_WORD4, "coroutines", FALSE }, - { SCE_LUA_WORD5, "word5", FALSE }, - { SCE_LUA_WORD6, "word6", FALSE }, - { SCE_LUA_WORD7, "word7", FALSE }, - { SCE_LUA_WORD8, "word8", FALSE }, - { SCE_LUA_LABEL, "label", FALSE } + { SCE_LUA_DEFAULT, "default", FALSE, FALSE }, + { SCE_LUA_COMMENT, "comment", FALSE, FALSE }, + { SCE_LUA_COMMENTLINE, "commentline", FALSE, FALSE }, + { SCE_LUA_COMMENTDOC, "commentdoc", FALSE, FALSE }, + { SCE_LUA_NUMBER, "number", FALSE, FALSE }, + { SCE_LUA_WORD, "word", FALSE, FALSE }, + { SCE_LUA_STRING, "string", FALSE, FALSE }, + { SCE_LUA_CHARACTER, "character", FALSE, FALSE }, + { SCE_LUA_LITERALSTRING, "literalstring", FALSE, FALSE }, + { SCE_LUA_PREPROCESSOR, "preprocessor", FALSE, FALSE }, + { SCE_LUA_OPERATOR, "operator", FALSE, FALSE }, + { SCE_LUA_IDENTIFIER, "identifier", FALSE, FALSE }, + { SCE_LUA_STRINGEOL, "stringeol", FALSE, FALSE }, + { SCE_LUA_WORD2, "function_basic", FALSE, FALSE }, + { SCE_LUA_WORD3, "function_other", FALSE, FALSE }, + { SCE_LUA_WORD4, "coroutines", FALSE, FALSE }, + { SCE_LUA_WORD5, "word5", FALSE, FALSE }, + { SCE_LUA_WORD6, "word6", FALSE, FALSE }, + { SCE_LUA_WORD7, "word7", FALSE, FALSE }, + { SCE_LUA_WORD8, "word8", FALSE, FALSE }, + { SCE_LUA_LABEL, "label", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_LUA[] = { @@ -1073,13 +1074,13 @@ static const HLKeyword highlighting_keywords_LUA[] = #define highlighting_lexer_MAKE SCLEX_MAKEFILE static const HLStyle highlighting_styles_MAKE[] = { - { SCE_MAKE_DEFAULT, "default", FALSE }, - { SCE_MAKE_COMMENT, "comment", FALSE }, - { SCE_MAKE_PREPROCESSOR, "preprocessor", FALSE }, - { SCE_MAKE_IDENTIFIER, "identifier", FALSE }, - { SCE_MAKE_OPERATOR, "operator", FALSE }, - { SCE_MAKE_TARGET, "target", FALSE }, - { SCE_MAKE_IDEOL, "ideol", FALSE } + { SCE_MAKE_DEFAULT, "default", FALSE, FALSE }, + { SCE_MAKE_COMMENT, "comment", FALSE, FALSE }, + { SCE_MAKE_PREPROCESSOR, "preprocessor", FALSE, FALSE }, + { SCE_MAKE_IDENTIFIER, "identifier", FALSE, FALSE }, + { SCE_MAKE_OPERATOR, "operator", FALSE, FALSE }, + { SCE_MAKE_TARGET, "target", FALSE, FALSE }, + { SCE_MAKE_IDEOL, "ideol", FALSE, FALSE } }; #define highlighting_keywords_MAKE EMPTY_KEYWORDS #define highlighting_properties_MAKE EMPTY_PROPERTIES @@ -1089,28 +1090,28 @@ static const HLStyle highlighting_styles_MAKE[] = #define highlighting_lexer_MARKDOWN SCLEX_MARKDOWN static const HLStyle highlighting_styles_MARKDOWN[] = { - { SCE_MARKDOWN_DEFAULT, "default", FALSE }, - { SCE_MARKDOWN_LINE_BEGIN, "default", FALSE }, /* FIXME: avoid in-code re-mappings */ - { SCE_MARKDOWN_PRECHAR, "default", FALSE }, - { SCE_MARKDOWN_STRONG1, "strong", FALSE }, - { SCE_MARKDOWN_STRONG2, "strong", FALSE }, - { SCE_MARKDOWN_EM1, "emphasis", FALSE }, - { SCE_MARKDOWN_EM2, "emphasis", FALSE }, - { SCE_MARKDOWN_HEADER1, "header1", FALSE }, - { SCE_MARKDOWN_HEADER2, "header2", FALSE }, - { SCE_MARKDOWN_HEADER3, "header3", FALSE }, - { SCE_MARKDOWN_HEADER4, "header4", FALSE }, - { SCE_MARKDOWN_HEADER5, "header5", FALSE }, - { SCE_MARKDOWN_HEADER6, "header6", FALSE }, - { SCE_MARKDOWN_ULIST_ITEM, "ulist_item", FALSE }, - { SCE_MARKDOWN_OLIST_ITEM, "olist_item", FALSE }, - { SCE_MARKDOWN_BLOCKQUOTE, "blockquote", FALSE }, - { SCE_MARKDOWN_STRIKEOUT, "strikeout", FALSE }, - { SCE_MARKDOWN_HRULE, "hrule", FALSE }, - { SCE_MARKDOWN_LINK, "link", FALSE }, - { SCE_MARKDOWN_CODE, "code", FALSE }, - { SCE_MARKDOWN_CODE2, "code", FALSE }, - { SCE_MARKDOWN_CODEBK, "codebk", FALSE } + { SCE_MARKDOWN_DEFAULT, "default", FALSE, FALSE }, + { SCE_MARKDOWN_LINE_BEGIN, "default", FALSE, FALSE }, /* FIXME: avoid in-code re-mappings */ + { SCE_MARKDOWN_PRECHAR, "default", FALSE, FALSE }, + { SCE_MARKDOWN_STRONG1, "strong", FALSE, FALSE }, + { SCE_MARKDOWN_STRONG2, "strong", FALSE, FALSE }, + { SCE_MARKDOWN_EM1, "emphasis", FALSE, FALSE }, + { SCE_MARKDOWN_EM2, "emphasis", FALSE, FALSE }, + { SCE_MARKDOWN_HEADER1, "header1", FALSE, FALSE }, + { SCE_MARKDOWN_HEADER2, "header2", FALSE, FALSE }, + { SCE_MARKDOWN_HEADER3, "header3", FALSE, FALSE }, + { SCE_MARKDOWN_HEADER4, "header4", FALSE, FALSE }, + { SCE_MARKDOWN_HEADER5, "header5", FALSE, FALSE }, + { SCE_MARKDOWN_HEADER6, "header6", FALSE, FALSE }, + { SCE_MARKDOWN_ULIST_ITEM, "ulist_item", FALSE, FALSE }, + { SCE_MARKDOWN_OLIST_ITEM, "olist_item", FALSE, FALSE }, + { SCE_MARKDOWN_BLOCKQUOTE, "blockquote", FALSE, FALSE }, + { SCE_MARKDOWN_STRIKEOUT, "strikeout", FALSE, FALSE }, + { SCE_MARKDOWN_HRULE, "hrule", FALSE, FALSE }, + { SCE_MARKDOWN_LINK, "link", FALSE, FALSE }, + { SCE_MARKDOWN_CODE, "code", FALSE, FALSE }, + { SCE_MARKDOWN_CODE2, "code", FALSE, FALSE }, + { SCE_MARKDOWN_CODEBK, "codebk", FALSE, FALSE } }; #define highlighting_keywords_MARKDOWN EMPTY_KEYWORDS #define highlighting_properties_MARKDOWN EMPTY_PROPERTIES @@ -1120,15 +1121,15 @@ static const HLStyle highlighting_styles_MARKDOWN[] = #define highlighting_lexer_MATLAB SCLEX_OCTAVE /* not MATLAB to support Octave's # comments */ static const HLStyle highlighting_styles_MATLAB[] = { - { SCE_MATLAB_DEFAULT, "default", FALSE }, - { SCE_MATLAB_COMMENT, "comment", FALSE }, - { SCE_MATLAB_COMMAND, "command", FALSE }, - { SCE_MATLAB_NUMBER, "number", FALSE }, - { SCE_MATLAB_KEYWORD, "keyword", FALSE }, - { SCE_MATLAB_STRING, "string", FALSE }, - { SCE_MATLAB_OPERATOR, "operator", FALSE }, - { SCE_MATLAB_IDENTIFIER, "identifier", FALSE }, - { SCE_MATLAB_DOUBLEQUOTESTRING, "doublequotedstring", FALSE } + { SCE_MATLAB_DEFAULT, "default", FALSE, FALSE }, + { SCE_MATLAB_COMMENT, "comment", FALSE, FALSE }, + { SCE_MATLAB_COMMAND, "command", FALSE, FALSE }, + { SCE_MATLAB_NUMBER, "number", FALSE, FALSE }, + { SCE_MATLAB_KEYWORD, "keyword", FALSE, FALSE }, + { SCE_MATLAB_STRING, "string", FALSE, FALSE }, + { SCE_MATLAB_OPERATOR, "operator", FALSE, FALSE }, + { SCE_MATLAB_IDENTIFIER, "identifier", FALSE, FALSE }, + { SCE_MATLAB_DOUBLEQUOTESTRING, "doublequotedstring", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_MATLAB[] = { @@ -1141,25 +1142,25 @@ static const HLKeyword highlighting_keywords_MATLAB[] = #define highlighting_lexer_NSIS SCLEX_NSIS static const HLStyle highlighting_styles_NSIS[] = { - { SCE_NSIS_DEFAULT, "default", FALSE }, - { SCE_NSIS_COMMENT, "comment", FALSE }, - { SCE_NSIS_STRINGDQ, "stringdq", FALSE }, - { SCE_NSIS_STRINGLQ, "stringlq", FALSE }, - { SCE_NSIS_STRINGRQ, "stringrq", FALSE }, - { SCE_NSIS_FUNCTION, "function", FALSE }, - { SCE_NSIS_VARIABLE, "variable", FALSE }, - { SCE_NSIS_LABEL, "label", FALSE }, - { SCE_NSIS_USERDEFINED, "userdefined", FALSE }, - { SCE_NSIS_SECTIONDEF, "sectiondef", FALSE }, - { SCE_NSIS_SUBSECTIONDEF, "subsectiondef", FALSE }, - { SCE_NSIS_IFDEFINEDEF, "ifdefinedef", FALSE }, - { SCE_NSIS_MACRODEF, "macrodef", FALSE }, - { SCE_NSIS_STRINGVAR, "stringvar", FALSE }, - { SCE_NSIS_NUMBER, "number", FALSE }, - { SCE_NSIS_SECTIONGROUP, "sectiongroup", FALSE }, - { SCE_NSIS_PAGEEX, "pageex", FALSE }, - { SCE_NSIS_FUNCTIONDEF, "functiondef", FALSE }, - { SCE_NSIS_COMMENTBOX, "commentbox", FALSE } + { SCE_NSIS_DEFAULT, "default", FALSE, FALSE }, + { SCE_NSIS_COMMENT, "comment", FALSE, FALSE }, + { SCE_NSIS_STRINGDQ, "stringdq", FALSE, FALSE }, + { SCE_NSIS_STRINGLQ, "stringlq", FALSE, FALSE }, + { SCE_NSIS_STRINGRQ, "stringrq", FALSE, FALSE }, + { SCE_NSIS_FUNCTION, "function", FALSE, FALSE }, + { SCE_NSIS_VARIABLE, "variable", FALSE, FALSE }, + { SCE_NSIS_LABEL, "label", FALSE, FALSE }, + { SCE_NSIS_USERDEFINED, "userdefined", FALSE, FALSE }, + { SCE_NSIS_SECTIONDEF, "sectiondef", FALSE, FALSE }, + { SCE_NSIS_SUBSECTIONDEF, "subsectiondef", FALSE, FALSE }, + { SCE_NSIS_IFDEFINEDEF, "ifdefinedef", FALSE, FALSE }, + { SCE_NSIS_MACRODEF, "macrodef", FALSE, FALSE }, + { SCE_NSIS_STRINGVAR, "stringvar", FALSE, FALSE }, + { SCE_NSIS_NUMBER, "number", FALSE, FALSE }, + { SCE_NSIS_SECTIONGROUP, "sectiongroup", FALSE, FALSE }, + { SCE_NSIS_PAGEEX, "pageex", FALSE, FALSE }, + { SCE_NSIS_FUNCTIONDEF, "functiondef", FALSE, FALSE }, + { SCE_NSIS_COMMENTBOX, "commentbox", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_NSIS[] = { @@ -1189,21 +1190,21 @@ static const HLKeyword highlighting_keywords_OBJECTIVEC[] = #define highlighting_lexer_PASCAL SCLEX_PASCAL static const HLStyle highlighting_styles_PASCAL[] = { - { SCE_PAS_DEFAULT, "default", FALSE }, - { SCE_PAS_IDENTIFIER, "identifier", FALSE }, - { SCE_PAS_COMMENT, "comment", FALSE }, - { SCE_PAS_COMMENT2, "comment2", FALSE }, - { SCE_PAS_COMMENTLINE, "commentline", FALSE }, - { SCE_PAS_PREPROCESSOR, "preprocessor", FALSE }, - { SCE_PAS_PREPROCESSOR2, "preprocessor2", FALSE }, - { SCE_PAS_NUMBER, "number", FALSE }, - { SCE_PAS_HEXNUMBER, "hexnumber", FALSE }, - { SCE_PAS_WORD, "word", FALSE }, - { SCE_PAS_STRING, "string", FALSE }, - { SCE_PAS_STRINGEOL, "stringeol", FALSE }, - { SCE_PAS_CHARACTER, "character", FALSE }, - { SCE_PAS_OPERATOR, "operator", FALSE }, - { SCE_PAS_ASM, "asm", FALSE } + { SCE_PAS_DEFAULT, "default", FALSE, FALSE }, + { SCE_PAS_IDENTIFIER, "identifier", FALSE, FALSE }, + { SCE_PAS_COMMENT, "comment", FALSE, FALSE }, + { SCE_PAS_COMMENT2, "comment2", FALSE, FALSE }, + { SCE_PAS_COMMENTLINE, "commentline", FALSE, FALSE }, + { SCE_PAS_PREPROCESSOR, "preprocessor", FALSE, FALSE }, + { SCE_PAS_PREPROCESSOR2, "preprocessor2", FALSE, FALSE }, + { SCE_PAS_NUMBER, "number", FALSE, FALSE }, + { SCE_PAS_HEXNUMBER, "hexnumber", FALSE, FALSE }, + { SCE_PAS_WORD, "word", FALSE, FALSE }, + { SCE_PAS_STRING, "string", FALSE, FALSE }, + { SCE_PAS_STRINGEOL, "stringeol", FALSE, FALSE }, + { SCE_PAS_CHARACTER, "character", FALSE, FALSE }, + { SCE_PAS_OPERATOR, "operator", FALSE, FALSE }, + { SCE_PAS_ASM, "asm", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_PASCAL[] = { @@ -1216,51 +1217,51 @@ static const HLKeyword highlighting_keywords_PASCAL[] = #define highlighting_lexer_PERL SCLEX_PERL static const HLStyle highlighting_styles_PERL[] = { - { SCE_PL_DEFAULT, "default", FALSE }, - { SCE_PL_ERROR, "error", FALSE }, - { SCE_PL_COMMENTLINE, "commentline", FALSE }, - { SCE_PL_NUMBER, "number", FALSE }, - { SCE_PL_WORD, "word", FALSE }, - { SCE_PL_STRING, "string", FALSE }, - { SCE_PL_CHARACTER, "character", FALSE }, - { SCE_PL_PREPROCESSOR, "preprocessor", FALSE }, - { SCE_PL_OPERATOR, "operator", FALSE }, - { SCE_PL_IDENTIFIER, "identifier", FALSE }, - { SCE_PL_SCALAR, "scalar", FALSE }, - { SCE_PL_POD, "pod", FALSE }, - { SCE_PL_REGEX, "regex", FALSE }, - { SCE_PL_ARRAY, "array", FALSE }, - { SCE_PL_HASH, "hash", FALSE }, - { SCE_PL_SYMBOLTABLE, "symboltable", FALSE }, - { SCE_PL_BACKTICKS, "backticks", FALSE }, - { SCE_PL_POD_VERB, "pod_verbatim", FALSE }, - { SCE_PL_REGSUBST, "reg_subst", FALSE }, - { SCE_PL_DATASECTION, "datasection", FALSE }, - { SCE_PL_HERE_DELIM, "here_delim", FALSE }, - { SCE_PL_HERE_Q, "here_q", FALSE }, - { SCE_PL_HERE_QQ, "here_qq", FALSE }, - { SCE_PL_HERE_QX, "here_qx", FALSE }, - { SCE_PL_STRING_Q, "string_q", FALSE }, - { SCE_PL_STRING_QQ, "string_qq", FALSE }, - { SCE_PL_STRING_QX, "string_qx", FALSE }, - { SCE_PL_STRING_QR, "string_qr", FALSE }, - { SCE_PL_STRING_QW, "string_qw", FALSE }, - { SCE_PL_VARIABLE_INDEXER, "variable_indexer", FALSE }, - { SCE_PL_PUNCTUATION, "punctuation", FALSE }, - { SCE_PL_LONGQUOTE, "longquote", FALSE }, - { SCE_PL_SUB_PROTOTYPE, "sub_prototype", FALSE }, - { SCE_PL_FORMAT_IDENT, "format_ident", FALSE }, - { SCE_PL_FORMAT, "format", FALSE }, - { SCE_PL_STRING_VAR, "string_var", FALSE }, - { SCE_PL_XLAT, "xlat", FALSE }, - { SCE_PL_REGEX_VAR, "regex_var", FALSE }, - { SCE_PL_REGSUBST_VAR, "regsubst_var", FALSE }, - { SCE_PL_BACKTICKS_VAR, "backticks_var", FALSE }, - { SCE_PL_HERE_QQ_VAR, "here_qq_var", FALSE }, - { SCE_PL_HERE_QX_VAR, "here_qx_var", FALSE }, - { SCE_PL_STRING_QQ_VAR, "string_qq_var", FALSE }, - { SCE_PL_STRING_QX_VAR, "string_qx_var", FALSE }, - { SCE_PL_STRING_QR_VAR, "string_qr_var", FALSE } + { SCE_PL_DEFAULT, "default", FALSE, FALSE }, + { SCE_PL_ERROR, "error", FALSE, FALSE }, + { SCE_PL_COMMENTLINE, "commentline", FALSE, FALSE }, + { SCE_PL_NUMBER, "number", FALSE, FALSE }, + { SCE_PL_WORD, "word", FALSE, FALSE }, + { SCE_PL_STRING, "string", FALSE, FALSE }, + { SCE_PL_CHARACTER, "character", FALSE, FALSE }, + { SCE_PL_PREPROCESSOR, "preprocessor", FALSE, FALSE }, + { SCE_PL_OPERATOR, "operator", FALSE, FALSE }, + { SCE_PL_IDENTIFIER, "identifier", FALSE, FALSE }, + { SCE_PL_SCALAR, "scalar", FALSE, FALSE }, + { SCE_PL_POD, "pod", FALSE, FALSE }, + { SCE_PL_REGEX, "regex", FALSE, FALSE }, + { SCE_PL_ARRAY, "array", FALSE, FALSE }, + { SCE_PL_HASH, "hash", FALSE, FALSE }, + { SCE_PL_SYMBOLTABLE, "symboltable", FALSE, FALSE }, + { SCE_PL_BACKTICKS, "backticks", FALSE, FALSE }, + { SCE_PL_POD_VERB, "pod_verbatim", FALSE, FALSE }, + { SCE_PL_REGSUBST, "reg_subst", FALSE, FALSE }, + { SCE_PL_DATASECTION, "datasection", FALSE, FALSE }, + { SCE_PL_HERE_DELIM, "here_delim", FALSE, FALSE }, + { SCE_PL_HERE_Q, "here_q", FALSE, FALSE }, + { SCE_PL_HERE_QQ, "here_qq", FALSE, FALSE }, + { SCE_PL_HERE_QX, "here_qx", FALSE, FALSE }, + { SCE_PL_STRING_Q, "string_q", FALSE, FALSE }, + { SCE_PL_STRING_QQ, "string_qq", FALSE, FALSE }, + { SCE_PL_STRING_QX, "string_qx", FALSE, FALSE }, + { SCE_PL_STRING_QR, "string_qr", FALSE, FALSE }, + { SCE_PL_STRING_QW, "string_qw", FALSE, FALSE }, + { SCE_PL_VARIABLE_INDEXER, "variable_indexer", FALSE, FALSE }, + { SCE_PL_PUNCTUATION, "punctuation", FALSE, FALSE }, + { SCE_PL_LONGQUOTE, "longquote", FALSE, FALSE }, + { SCE_PL_SUB_PROTOTYPE, "sub_prototype", FALSE, FALSE }, + { SCE_PL_FORMAT_IDENT, "format_ident", FALSE, FALSE }, + { SCE_PL_FORMAT, "format", FALSE, FALSE }, + { SCE_PL_STRING_VAR, "string_var", FALSE, FALSE }, + { SCE_PL_XLAT, "xlat", FALSE, FALSE }, + { SCE_PL_REGEX_VAR, "regex_var", FALSE, FALSE }, + { SCE_PL_REGSUBST_VAR, "regsubst_var", FALSE, FALSE }, + { SCE_PL_BACKTICKS_VAR, "backticks_var", FALSE, FALSE }, + { SCE_PL_HERE_QQ_VAR, "here_qq_var", FALSE, FALSE }, + { SCE_PL_HERE_QX_VAR, "here_qx_var", FALSE, FALSE }, + { SCE_PL_STRING_QQ_VAR, "string_qq_var", FALSE, FALSE }, + { SCE_PL_STRING_QX_VAR, "string_qx_var", FALSE, FALSE }, + { SCE_PL_STRING_QR_VAR, "string_qr_var", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_PERL[] = { @@ -1280,22 +1281,22 @@ static const HLKeyword highlighting_keywords_PERL[] = #define highlighting_lexer_PO SCLEX_PO static const HLStyle highlighting_styles_PO[] = { - { SCE_PO_DEFAULT, "default", FALSE }, - { SCE_PO_COMMENT, "comment", FALSE }, - { SCE_PO_PROGRAMMER_COMMENT, "programmer_comment", FALSE }, - { SCE_PO_REFERENCE, "reference", FALSE }, - { SCE_PO_FLAGS, "flags", FALSE }, - { SCE_PO_FUZZY, "fuzzy", FALSE }, - { SCE_PO_MSGID, "msgid", FALSE }, - { SCE_PO_MSGID_TEXT, "msgid_text", FALSE }, - { SCE_PO_MSGID_TEXT_EOL, "msgid_text_eol", FALSE }, - { SCE_PO_MSGSTR, "msgstr", FALSE }, - { SCE_PO_MSGSTR_TEXT, "msgstr_text", FALSE }, - { SCE_PO_MSGSTR_TEXT_EOL, "msgstr_text_eol", FALSE }, - { SCE_PO_MSGCTXT, "msgctxt", FALSE }, - { SCE_PO_MSGCTXT_TEXT, "msgctxt_text", FALSE }, - { SCE_PO_MSGCTXT_TEXT_EOL, "msgctxt_text_eol", FALSE }, - { SCE_PO_ERROR, "error", FALSE } + { SCE_PO_DEFAULT, "default", FALSE, FALSE }, + { SCE_PO_COMMENT, "comment", FALSE, FALSE }, + { SCE_PO_PROGRAMMER_COMMENT, "programmer_comment", FALSE, FALSE }, + { SCE_PO_REFERENCE, "reference", FALSE, FALSE }, + { SCE_PO_FLAGS, "flags", FALSE, FALSE }, + { SCE_PO_FUZZY, "fuzzy", FALSE, FALSE }, + { SCE_PO_MSGID, "msgid", FALSE, FALSE }, + { SCE_PO_MSGID_TEXT, "msgid_text", FALSE, FALSE }, + { SCE_PO_MSGID_TEXT_EOL, "msgid_text_eol", FALSE, FALSE }, + { SCE_PO_MSGSTR, "msgstr", FALSE, FALSE }, + { SCE_PO_MSGSTR_TEXT, "msgstr_text", FALSE, FALSE }, + { SCE_PO_MSGSTR_TEXT_EOL, "msgstr_text_eol", FALSE, FALSE }, + { SCE_PO_MSGCTXT, "msgctxt", FALSE, FALSE }, + { SCE_PO_MSGCTXT_TEXT, "msgctxt_text", FALSE, FALSE }, + { SCE_PO_MSGCTXT_TEXT_EOL, "msgctxt_text_eol", FALSE, FALSE }, + { SCE_PO_ERROR, "error", FALSE, FALSE } }; #define highlighting_keywords_PO EMPTY_KEYWORDS #define highlighting_properties_PO EMPTY_PROPERTIES @@ -1305,23 +1306,23 @@ static const HLStyle highlighting_styles_PO[] = #define highlighting_lexer_POWERSHELL SCLEX_POWERSHELL static const HLStyle highlighting_styles_POWERSHELL[] = { - { SCE_POWERSHELL_DEFAULT, "default", FALSE }, - { SCE_POWERSHELL_COMMENT, "comment", FALSE }, - { SCE_POWERSHELL_STRING, "string", FALSE }, - { SCE_POWERSHELL_CHARACTER, "character", FALSE }, - { SCE_POWERSHELL_NUMBER, "number", FALSE }, - { SCE_POWERSHELL_VARIABLE, "variable", FALSE }, - { SCE_POWERSHELL_OPERATOR, "operator", FALSE }, - { SCE_POWERSHELL_IDENTIFIER, "identifier", FALSE }, - { SCE_POWERSHELL_KEYWORD, "keyword", FALSE }, - { SCE_POWERSHELL_CMDLET, "cmdlet", FALSE }, - { SCE_POWERSHELL_ALIAS, "alias", FALSE }, - { SCE_POWERSHELL_FUNCTION, "function", FALSE }, - { SCE_POWERSHELL_USER1, "user1", FALSE }, - { SCE_POWERSHELL_COMMENTSTREAM, "commentstream", FALSE }, - { SCE_POWERSHELL_HERE_STRING, "here_string", FALSE }, - { SCE_POWERSHELL_HERE_CHARACTER, "here_character", FALSE }, - { SCE_POWERSHELL_COMMENTDOCKEYWORD, "commentdockeyword", FALSE }, + { SCE_POWERSHELL_DEFAULT, "default", FALSE, FALSE }, + { SCE_POWERSHELL_COMMENT, "comment", FALSE, FALSE }, + { SCE_POWERSHELL_STRING, "string", FALSE, FALSE }, + { SCE_POWERSHELL_CHARACTER, "character", FALSE, FALSE }, + { SCE_POWERSHELL_NUMBER, "number", FALSE, FALSE }, + { SCE_POWERSHELL_VARIABLE, "variable", FALSE, FALSE }, + { SCE_POWERSHELL_OPERATOR, "operator", FALSE, FALSE }, + { SCE_POWERSHELL_IDENTIFIER, "identifier", FALSE, FALSE }, + { SCE_POWERSHELL_KEYWORD, "keyword", FALSE, FALSE }, + { SCE_POWERSHELL_CMDLET, "cmdlet", FALSE, FALSE }, + { SCE_POWERSHELL_ALIAS, "alias", FALSE, FALSE }, + { SCE_POWERSHELL_FUNCTION, "function", FALSE, FALSE }, + { SCE_POWERSHELL_USER1, "user1", FALSE, FALSE }, + { SCE_POWERSHELL_COMMENTSTREAM, "commentstream", FALSE, FALSE }, + { SCE_POWERSHELL_HERE_STRING, "here_string", FALSE, FALSE }, + { SCE_POWERSHELL_HERE_CHARACTER, "here_character", FALSE, FALSE }, + { SCE_POWERSHELL_COMMENTDOCKEYWORD, "commentdockeyword", FALSE, FALSE }, }; static const HLKeyword highlighting_keywords_POWERSHELL[] = { @@ -1339,27 +1340,27 @@ static const HLKeyword highlighting_keywords_POWERSHELL[] = #define highlighting_lexer_PYTHON SCLEX_PYTHON static const HLStyle highlighting_styles_PYTHON[] = { - { SCE_P_DEFAULT, "default", FALSE }, - { SCE_P_COMMENTLINE, "commentline", FALSE }, - { SCE_P_NUMBER, "number", FALSE }, - { SCE_P_STRING, "string", FALSE }, - { SCE_P_CHARACTER, "character", FALSE }, - { SCE_P_WORD, "word", FALSE }, - { SCE_P_TRIPLE, "triple", FALSE }, - { SCE_P_TRIPLEDOUBLE, "tripledouble", FALSE }, - { SCE_P_CLASSNAME, "classname", FALSE }, - { SCE_P_DEFNAME, "defname", FALSE }, - { SCE_P_OPERATOR, "operator", FALSE }, - { SCE_P_IDENTIFIER, "identifier", FALSE }, - { SCE_P_COMMENTBLOCK, "commentblock", FALSE }, - { SCE_P_STRINGEOL, "stringeol", FALSE }, - { SCE_P_WORD2, "word2", FALSE }, - { SCE_P_FSTRING, "fstring", FALSE }, - { SCE_P_FCHARACTER, "fcharacter", FALSE }, - { SCE_P_FTRIPLE, "ftriple", FALSE }, - { SCE_P_FTRIPLEDOUBLE, "ftripledouble", FALSE }, - { SCE_P_DECORATOR, "decorator", FALSE }, - { SCE_P_ATTRIBUTE, "attribute", FALSE } + { SCE_P_DEFAULT, "default", FALSE, FALSE }, + { SCE_P_COMMENTLINE, "commentline", FALSE, FALSE }, + { SCE_P_NUMBER, "number", FALSE, FALSE }, + { SCE_P_STRING, "string", FALSE, FALSE }, + { SCE_P_CHARACTER, "character", FALSE, FALSE }, + { SCE_P_WORD, "word", FALSE, FALSE }, + { SCE_P_TRIPLE, "triple", FALSE, FALSE }, + { SCE_P_TRIPLEDOUBLE, "tripledouble", FALSE, FALSE }, + { SCE_P_CLASSNAME, "classname", FALSE, FALSE }, + { SCE_P_DEFNAME, "defname", FALSE, FALSE }, + { SCE_P_OPERATOR, "operator", FALSE, FALSE }, + { SCE_P_IDENTIFIER, "identifier", FALSE, TRUE }, + { SCE_P_COMMENTBLOCK, "commentblock", FALSE, FALSE }, + { SCE_P_STRINGEOL, "stringeol", FALSE, FALSE }, + { SCE_P_WORD2, "word2", FALSE, FALSE }, + { SCE_P_FSTRING, "fstring", FALSE, FALSE }, + { SCE_P_FCHARACTER, "fcharacter", FALSE, FALSE }, + { SCE_P_FTRIPLE, "ftriple", FALSE, FALSE }, + { SCE_P_FTRIPLEDOUBLE, "ftripledouble", FALSE, FALSE }, + { SCE_P_DECORATOR, "decorator", FALSE, FALSE }, + { SCE_P_ATTRIBUTE, "attribute", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_PYTHON[] = { @@ -1373,22 +1374,22 @@ static const HLKeyword highlighting_keywords_PYTHON[] = #define highlighting_lexer_R SCLEX_R static const HLStyle highlighting_styles_R[] = { - { SCE_R_DEFAULT, "default", FALSE }, - { SCE_R_COMMENT, "comment", FALSE }, - { SCE_R_KWORD, "kword", FALSE }, - { SCE_R_OPERATOR, "operator", FALSE }, - { SCE_R_BASEKWORD, "basekword", FALSE }, - { SCE_R_OTHERKWORD, "otherkword", FALSE }, - { SCE_R_NUMBER, "number", FALSE }, - { SCE_R_STRING, "string", FALSE }, - { SCE_R_STRING2, "string2", FALSE }, - { SCE_R_IDENTIFIER, "identifier", FALSE }, - { SCE_R_INFIX, "infix", FALSE }, - { SCE_R_INFIXEOL, "infixeol", FALSE }, - { SCE_R_BACKTICKS, "backticks", FALSE }, - { SCE_R_RAWSTRING, "stringraw", FALSE }, - { SCE_R_RAWSTRING2, "stringraw", FALSE }, - { SCE_R_ESCAPESEQUENCE, "escapesequence", FALSE } + { SCE_R_DEFAULT, "default", FALSE, FALSE }, + { SCE_R_COMMENT, "comment", FALSE, FALSE }, + { SCE_R_KWORD, "kword", FALSE, FALSE }, + { SCE_R_OPERATOR, "operator", FALSE, FALSE }, + { SCE_R_BASEKWORD, "basekword", FALSE, FALSE }, + { SCE_R_OTHERKWORD, "otherkword", FALSE, FALSE }, + { SCE_R_NUMBER, "number", FALSE, FALSE }, + { SCE_R_STRING, "string", FALSE, FALSE }, + { SCE_R_STRING2, "string2", FALSE, FALSE }, + { SCE_R_IDENTIFIER, "identifier", FALSE, FALSE }, + { SCE_R_INFIX, "infix", FALSE, FALSE }, + { SCE_R_INFIXEOL, "infixeol", FALSE, FALSE }, + { SCE_R_BACKTICKS, "backticks", FALSE, FALSE }, + { SCE_R_RAWSTRING, "stringraw", FALSE, FALSE }, + { SCE_R_RAWSTRING2, "stringraw", FALSE, FALSE }, + { SCE_R_ESCAPESEQUENCE, "escapesequence", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_R[] = { @@ -1403,44 +1404,44 @@ static const HLKeyword highlighting_keywords_R[] = #define highlighting_lexer_RUBY SCLEX_RUBY static const HLStyle highlighting_styles_RUBY[] = { - { SCE_RB_DEFAULT, "default", FALSE }, - { SCE_RB_COMMENTLINE, "commentline", FALSE }, - { SCE_RB_NUMBER, "number", FALSE }, - { SCE_RB_STRING, "string", FALSE }, - { SCE_RB_CHARACTER, "character", FALSE }, - { SCE_RB_WORD, "word", FALSE }, - { SCE_RB_GLOBAL, "global", FALSE }, - { SCE_RB_SYMBOL, "symbol", FALSE }, - { SCE_RB_CLASSNAME, "classname", FALSE }, - { SCE_RB_DEFNAME, "defname", FALSE }, - { SCE_RB_OPERATOR, "operator", FALSE }, - { SCE_RB_IDENTIFIER, "identifier", FALSE }, - { SCE_RB_MODULE_NAME, "modulename", FALSE }, - { SCE_RB_BACKTICKS, "backticks", FALSE }, - { SCE_RB_INSTANCE_VAR, "instancevar", FALSE }, - { SCE_RB_CLASS_VAR, "classvar", FALSE }, - { SCE_RB_DATASECTION, "datasection", FALSE }, - { SCE_RB_HERE_DELIM, "heredelim", FALSE }, - { SCE_RB_WORD_DEMOTED, "worddemoted", FALSE }, - { SCE_RB_STDIN, "stdin", FALSE }, - { SCE_RB_STDOUT, "stdout", FALSE }, - { SCE_RB_STDERR, "stderr", FALSE }, - { SCE_RB_REGEX, "regex", FALSE }, - { SCE_RB_HERE_Q, "here_q", FALSE }, - { SCE_RB_HERE_QQ, "here_qq", FALSE }, - { SCE_RB_HERE_QX, "here_qx", FALSE }, - { SCE_RB_STRING_Q, "string_q", FALSE }, - { SCE_RB_STRING_QQ, "string_qq", FALSE }, - { SCE_RB_STRING_QX, "string_qx", FALSE }, - { SCE_RB_STRING_QR, "string_qr", FALSE }, - { SCE_RB_STRING_QW, "string_qw", FALSE }, - { SCE_RB_STRING_W, "string_qw", FALSE }, - { SCE_RB_STRING_QI, "symbol", FALSE }, - { SCE_RB_STRING_QS, "symbol", FALSE }, - { SCE_RB_STRING_I, "symbol", FALSE }, - { SCE_RB_UPPER_BOUND, "upper_bound", FALSE }, - { SCE_RB_ERROR, "error", FALSE }, - { SCE_RB_POD, "pod", FALSE } + { SCE_RB_DEFAULT, "default", FALSE, FALSE }, + { SCE_RB_COMMENTLINE, "commentline", FALSE, FALSE }, + { SCE_RB_NUMBER, "number", FALSE, FALSE }, + { SCE_RB_STRING, "string", FALSE, FALSE }, + { SCE_RB_CHARACTER, "character", FALSE, FALSE }, + { SCE_RB_WORD, "word", FALSE, FALSE }, + { SCE_RB_GLOBAL, "global", FALSE, FALSE }, + { SCE_RB_SYMBOL, "symbol", FALSE, FALSE }, + { SCE_RB_CLASSNAME, "classname", FALSE, FALSE }, + { SCE_RB_DEFNAME, "defname", FALSE, FALSE }, + { SCE_RB_OPERATOR, "operator", FALSE, FALSE }, + { SCE_RB_IDENTIFIER, "identifier", FALSE, FALSE }, + { SCE_RB_MODULE_NAME, "modulename", FALSE, FALSE }, + { SCE_RB_BACKTICKS, "backticks", FALSE, FALSE }, + { SCE_RB_INSTANCE_VAR, "instancevar", FALSE, FALSE }, + { SCE_RB_CLASS_VAR, "classvar", FALSE, FALSE }, + { SCE_RB_DATASECTION, "datasection", FALSE, FALSE }, + { SCE_RB_HERE_DELIM, "heredelim", FALSE, FALSE }, + { SCE_RB_WORD_DEMOTED, "worddemoted", FALSE, FALSE }, + { SCE_RB_STDIN, "stdin", FALSE, FALSE }, + { SCE_RB_STDOUT, "stdout", FALSE, FALSE }, + { SCE_RB_STDERR, "stderr", FALSE, FALSE }, + { SCE_RB_REGEX, "regex", FALSE, FALSE }, + { SCE_RB_HERE_Q, "here_q", FALSE, FALSE }, + { SCE_RB_HERE_QQ, "here_qq", FALSE, FALSE }, + { SCE_RB_HERE_QX, "here_qx", FALSE, FALSE }, + { SCE_RB_STRING_Q, "string_q", FALSE, FALSE }, + { SCE_RB_STRING_QQ, "string_qq", FALSE, FALSE }, + { SCE_RB_STRING_QX, "string_qx", FALSE, FALSE }, + { SCE_RB_STRING_QR, "string_qr", FALSE, FALSE }, + { SCE_RB_STRING_QW, "string_qw", FALSE, FALSE }, + { SCE_RB_STRING_W, "string_qw", FALSE, FALSE }, + { SCE_RB_STRING_QI, "symbol", FALSE, FALSE }, + { SCE_RB_STRING_QS, "symbol", FALSE, FALSE }, + { SCE_RB_STRING_I, "symbol", FALSE, FALSE }, + { SCE_RB_UPPER_BOUND, "upper_bound", FALSE, FALSE }, + { SCE_RB_ERROR, "error", FALSE, FALSE }, + { SCE_RB_POD, "pod", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_RUBY[] = { @@ -1452,30 +1453,30 @@ static const HLKeyword highlighting_keywords_RUBY[] = #define highlighting_lexer_RUST SCLEX_RUST static const HLStyle highlighting_styles_RUST[] = { - { SCE_RUST_DEFAULT, "default", FALSE }, - { SCE_RUST_COMMENTBLOCK, "commentblock", FALSE }, - { SCE_RUST_COMMENTLINE, "commentline", FALSE }, - { SCE_RUST_COMMENTBLOCKDOC, "commentblockdoc", FALSE }, - { SCE_RUST_COMMENTLINEDOC, "commentlinedoc", FALSE }, - { SCE_RUST_NUMBER, "number", FALSE }, - { SCE_RUST_WORD, "word", FALSE }, - { SCE_RUST_WORD2, "word2", FALSE }, - { SCE_RUST_WORD3, "word3", FALSE }, - { SCE_RUST_WORD4, "word4", FALSE }, - { SCE_RUST_WORD5, "word5", FALSE }, - { SCE_RUST_WORD6, "word6", FALSE }, - { SCE_RUST_WORD7, "word7", FALSE }, - { SCE_RUST_STRING, "string", FALSE }, - { SCE_RUST_STRINGR, "stringraw", FALSE }, - { SCE_RUST_CHARACTER, "character", FALSE }, - { SCE_RUST_OPERATOR, "operator", FALSE }, - { SCE_RUST_IDENTIFIER, "identifier", FALSE }, - { SCE_RUST_LIFETIME, "lifetime", FALSE }, - { SCE_RUST_MACRO, "macro", FALSE }, - { SCE_RUST_LEXERROR, "lexerror", FALSE }, - { SCE_RUST_BYTESTRING, "bytestring", FALSE }, - { SCE_RUST_BYTESTRINGR, "bytestringr", FALSE }, - { SCE_RUST_BYTECHARACTER, "bytecharacter", FALSE } + { SCE_RUST_DEFAULT, "default", FALSE, FALSE }, + { SCE_RUST_COMMENTBLOCK, "commentblock", FALSE, FALSE }, + { SCE_RUST_COMMENTLINE, "commentline", FALSE, FALSE }, + { SCE_RUST_COMMENTBLOCKDOC, "commentblockdoc", FALSE, FALSE }, + { SCE_RUST_COMMENTLINEDOC, "commentlinedoc", FALSE, FALSE }, + { SCE_RUST_NUMBER, "number", FALSE, FALSE }, + { SCE_RUST_WORD, "word", FALSE, FALSE }, + { SCE_RUST_WORD2, "word2", FALSE, FALSE }, + { SCE_RUST_WORD3, "word3", FALSE, FALSE }, + { SCE_RUST_WORD4, "word4", FALSE, FALSE }, + { SCE_RUST_WORD5, "word5", FALSE, FALSE }, + { SCE_RUST_WORD6, "word6", FALSE, FALSE }, + { SCE_RUST_WORD7, "word7", FALSE, FALSE }, + { SCE_RUST_STRING, "string", FALSE, FALSE }, + { SCE_RUST_STRINGR, "stringraw", FALSE, FALSE }, + { SCE_RUST_CHARACTER, "character", FALSE, FALSE }, + { SCE_RUST_OPERATOR, "operator", FALSE, FALSE }, + { SCE_RUST_IDENTIFIER, "identifier", FALSE, FALSE }, + { SCE_RUST_LIFETIME, "lifetime", FALSE, FALSE }, + { SCE_RUST_MACRO, "macro", FALSE, FALSE }, + { SCE_RUST_LEXERROR, "lexerror", FALSE, FALSE }, + { SCE_RUST_BYTESTRING, "bytestring", FALSE, FALSE }, + { SCE_RUST_BYTESTRINGR, "bytestringr", FALSE, FALSE }, + { SCE_RUST_BYTECHARACTER, "bytecharacter", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_RUST[] = { @@ -1491,20 +1492,20 @@ static const HLKeyword highlighting_keywords_RUST[] = #define highlighting_lexer_SH SCLEX_BASH static const HLStyle highlighting_styles_SH[] = { - { SCE_SH_DEFAULT, "default", FALSE }, - { SCE_SH_COMMENTLINE, "commentline", FALSE }, - { SCE_SH_NUMBER, "number", FALSE }, - { SCE_SH_WORD, "word", FALSE }, - { SCE_SH_STRING, "string", FALSE }, - { SCE_SH_CHARACTER, "character", FALSE }, - { SCE_SH_OPERATOR, "operator", FALSE }, - { SCE_SH_IDENTIFIER, "identifier", FALSE }, - { SCE_SH_BACKTICKS, "backticks", FALSE }, - { SCE_SH_PARAM, "param", FALSE }, - { SCE_SH_SCALAR, "scalar", FALSE }, - { SCE_SH_ERROR, "error", FALSE }, - { SCE_SH_HERE_DELIM, "here_delim", FALSE }, - { SCE_SH_HERE_Q, "here_q", FALSE } + { SCE_SH_DEFAULT, "default", FALSE, FALSE }, + { SCE_SH_COMMENTLINE, "commentline", FALSE, FALSE }, + { SCE_SH_NUMBER, "number", FALSE, FALSE }, + { SCE_SH_WORD, "word", FALSE, FALSE }, + { SCE_SH_STRING, "string", FALSE, FALSE }, + { SCE_SH_CHARACTER, "character", FALSE, FALSE }, + { SCE_SH_OPERATOR, "operator", FALSE, FALSE }, + { SCE_SH_IDENTIFIER, "identifier", FALSE, TRUE }, + { SCE_SH_BACKTICKS, "backticks", FALSE, FALSE }, + { SCE_SH_PARAM, "param", FALSE, FALSE }, + { SCE_SH_SCALAR, "scalar", FALSE, TRUE }, + { SCE_SH_ERROR, "error", FALSE, FALSE }, + { SCE_SH_HERE_DELIM, "here_delim", FALSE, FALSE }, + { SCE_SH_HERE_Q, "here_q", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_SH[] = { @@ -1517,23 +1518,23 @@ static const HLKeyword highlighting_keywords_SH[] = #define highlighting_lexer_SMALLTALK SCLEX_SMALLTALK static const HLStyle highlighting_styles_SMALLTALK[] = { - { SCE_ST_DEFAULT, "default", FALSE }, - { SCE_ST_SPECIAL, "special", FALSE }, - { SCE_ST_SYMBOL, "symbol", FALSE }, - { SCE_ST_ASSIGN, "assignment", FALSE }, - { SCE_ST_RETURN, "return", FALSE }, - { SCE_ST_NUMBER, "number", FALSE }, - { SCE_ST_BINARY, "binary", FALSE }, - { SCE_ST_SPEC_SEL, "special_selector", FALSE }, - { SCE_ST_KWSEND, "keyword_send", FALSE }, - { SCE_ST_GLOBAL, "global", FALSE }, - { SCE_ST_SELF, "self", FALSE }, - { SCE_ST_SUPER, "super", FALSE }, - { SCE_ST_NIL, "nil", FALSE }, - { SCE_ST_BOOL, "bool", FALSE }, - { SCE_ST_COMMENT, "comment", FALSE }, - { SCE_ST_STRING, "string", FALSE }, - { SCE_ST_CHARACTER, "character", FALSE } + { SCE_ST_DEFAULT, "default", FALSE, FALSE }, + { SCE_ST_SPECIAL, "special", FALSE, FALSE }, + { SCE_ST_SYMBOL, "symbol", FALSE, FALSE }, + { SCE_ST_ASSIGN, "assignment", FALSE, FALSE }, + { SCE_ST_RETURN, "return", FALSE, FALSE }, + { SCE_ST_NUMBER, "number", FALSE, FALSE }, + { SCE_ST_BINARY, "binary", FALSE, FALSE }, + { SCE_ST_SPEC_SEL, "special_selector", FALSE, FALSE }, + { SCE_ST_KWSEND, "keyword_send", FALSE, FALSE }, + { SCE_ST_GLOBAL, "global", FALSE, FALSE }, + { SCE_ST_SELF, "self", FALSE, FALSE }, + { SCE_ST_SUPER, "super", FALSE, FALSE }, + { SCE_ST_NIL, "nil", FALSE, FALSE }, + { SCE_ST_BOOL, "bool", FALSE, FALSE }, + { SCE_ST_COMMENT, "comment", FALSE, FALSE }, + { SCE_ST_STRING, "string", FALSE, FALSE }, + { SCE_ST_CHARACTER, "character", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_SMALLTALK[] = { @@ -1546,30 +1547,30 @@ static const HLKeyword highlighting_keywords_SMALLTALK[] = #define highlighting_lexer_SQL SCLEX_SQL static const HLStyle highlighting_styles_SQL[] = { - { SCE_SQL_DEFAULT, "default", FALSE }, - { SCE_SQL_COMMENT, "comment", FALSE }, - { SCE_SQL_COMMENTLINE, "commentline", FALSE }, - { SCE_SQL_COMMENTDOC, "commentdoc", FALSE }, - { SCE_SQL_COMMENTLINEDOC, "commentlinedoc", FALSE }, - { SCE_SQL_COMMENTDOCKEYWORD, "commentdockeyword", FALSE }, - { SCE_SQL_COMMENTDOCKEYWORDERROR, "commentdockeyworderror", FALSE }, - { SCE_SQL_NUMBER, "number", FALSE }, - { SCE_SQL_WORD, "word", FALSE }, - { SCE_SQL_WORD2, "word2", FALSE }, - { SCE_SQL_STRING, "string", FALSE }, - { SCE_SQL_CHARACTER, "character", FALSE }, - { SCE_SQL_OPERATOR, "operator", FALSE }, - { SCE_SQL_IDENTIFIER, "identifier", FALSE }, - { SCE_SQL_SQLPLUS, "sqlplus", FALSE }, - { SCE_SQL_SQLPLUS_PROMPT, "sqlplus_prompt", FALSE }, - { SCE_SQL_SQLPLUS_COMMENT, "sqlplus_comment", FALSE }, - { SCE_SQL_QUOTEDIDENTIFIER, "quotedidentifier", FALSE }, - { SCE_SQL_QOPERATOR, "qoperator", FALSE } + { SCE_SQL_DEFAULT, "default", FALSE, FALSE }, + { SCE_SQL_COMMENT, "comment", FALSE, FALSE }, + { SCE_SQL_COMMENTLINE, "commentline", FALSE, FALSE }, + { SCE_SQL_COMMENTDOC, "commentdoc", FALSE, FALSE }, + { SCE_SQL_COMMENTLINEDOC, "commentlinedoc", FALSE, FALSE }, + { SCE_SQL_COMMENTDOCKEYWORD, "commentdockeyword", FALSE, FALSE }, + { SCE_SQL_COMMENTDOCKEYWORDERROR, "commentdockeyworderror", FALSE, FALSE }, + { SCE_SQL_NUMBER, "number", FALSE, FALSE }, + { SCE_SQL_WORD, "word", FALSE, FALSE }, + { SCE_SQL_WORD2, "word2", FALSE, FALSE }, + { SCE_SQL_STRING, "string", FALSE, FALSE }, + { SCE_SQL_CHARACTER, "character", FALSE, FALSE }, + { SCE_SQL_OPERATOR, "operator", FALSE, FALSE }, + { SCE_SQL_IDENTIFIER, "identifier", FALSE, FALSE }, + { SCE_SQL_SQLPLUS, "sqlplus", FALSE, FALSE }, + { SCE_SQL_SQLPLUS_PROMPT, "sqlplus_prompt", FALSE, FALSE }, + { SCE_SQL_SQLPLUS_COMMENT, "sqlplus_comment", FALSE, FALSE }, + { SCE_SQL_QUOTEDIDENTIFIER, "quotedidentifier", FALSE, FALSE }, + { SCE_SQL_QOPERATOR, "qoperator", FALSE, FALSE } /* these are for user-defined keywords we don't set yet */ - /*{ SCE_SQL_USER1, "user1", FALSE }, - { SCE_SQL_USER2, "user2", FALSE }, - { SCE_SQL_USER3, "user3", FALSE }, - { SCE_SQL_USER4, "user4", FALSE }*/ + /*{ SCE_SQL_USER1, "user1", FALSE, FALSE }, + { SCE_SQL_USER2, "user2", FALSE, FALSE }, + { SCE_SQL_USER3, "user3", FALSE, FALSE }, + { SCE_SQL_USER4, "user4", FALSE, FALSE }*/ }; static const HLKeyword highlighting_keywords_SQL[] = { @@ -1582,29 +1583,29 @@ static const HLKeyword highlighting_keywords_SQL[] = #define highlighting_lexer_TCL SCLEX_TCL static const HLStyle highlighting_styles_TCL[] = { - { SCE_TCL_DEFAULT, "default", FALSE }, - { SCE_TCL_COMMENT, "comment", FALSE }, - { SCE_TCL_COMMENTLINE, "commentline", FALSE }, - { SCE_TCL_NUMBER, "number", FALSE }, - { SCE_TCL_OPERATOR, "operator", FALSE }, - { SCE_TCL_IDENTIFIER, "identifier", FALSE }, - { SCE_TCL_WORD_IN_QUOTE, "wordinquote", FALSE }, - { SCE_TCL_IN_QUOTE, "inquote", FALSE }, - { SCE_TCL_SUBSTITUTION, "substitution", FALSE }, - { SCE_TCL_MODIFIER, "modifier", FALSE }, - { SCE_TCL_EXPAND, "expand", FALSE }, - { SCE_TCL_WORD, "wordtcl", FALSE }, - { SCE_TCL_WORD2, "wordtk", FALSE }, - { SCE_TCL_WORD3, "worditcl", FALSE }, - { SCE_TCL_WORD4, "wordtkcmds", FALSE }, - { SCE_TCL_WORD5, "wordexpand", FALSE }, - { SCE_TCL_COMMENT_BOX, "commentbox", FALSE }, - { SCE_TCL_BLOCK_COMMENT, "blockcomment", FALSE }, - { SCE_TCL_SUB_BRACE, "subbrace", FALSE } + { SCE_TCL_DEFAULT, "default", FALSE, FALSE }, + { SCE_TCL_COMMENT, "comment", FALSE, FALSE }, + { SCE_TCL_COMMENTLINE, "commentline", FALSE, FALSE }, + { SCE_TCL_NUMBER, "number", FALSE, FALSE }, + { SCE_TCL_OPERATOR, "operator", FALSE, FALSE }, + { SCE_TCL_IDENTIFIER, "identifier", FALSE, FALSE }, + { SCE_TCL_WORD_IN_QUOTE, "wordinquote", FALSE, FALSE }, + { SCE_TCL_IN_QUOTE, "inquote", FALSE, FALSE }, + { SCE_TCL_SUBSTITUTION, "substitution", FALSE, FALSE }, + { SCE_TCL_MODIFIER, "modifier", FALSE, FALSE }, + { SCE_TCL_EXPAND, "expand", FALSE, FALSE }, + { SCE_TCL_WORD, "wordtcl", FALSE, FALSE }, + { SCE_TCL_WORD2, "wordtk", FALSE, FALSE }, + { SCE_TCL_WORD3, "worditcl", FALSE, FALSE }, + { SCE_TCL_WORD4, "wordtkcmds", FALSE, FALSE }, + { SCE_TCL_WORD5, "wordexpand", FALSE, FALSE }, + { SCE_TCL_COMMENT_BOX, "commentbox", FALSE, FALSE }, + { SCE_TCL_BLOCK_COMMENT, "blockcomment", FALSE, FALSE }, + { SCE_TCL_SUB_BRACE, "subbrace", FALSE, FALSE } /* these are for user-defined keywords we don't set yet */ - /*{ SCE_TCL_WORD6, "user2", FALSE }, - { SCE_TCL_WORD7, "user3", FALSE }, - { SCE_TCL_WORD8, "user4", FALSE }*/ + /*{ SCE_TCL_WORD6, "user2", FALSE, FALSE }, + { SCE_TCL_WORD7, "user3", FALSE, FALSE }, + { SCE_TCL_WORD8, "user4", FALSE, FALSE }*/ }; static const HLKeyword highlighting_keywords_TCL[] = { @@ -1621,32 +1622,32 @@ static const HLKeyword highlighting_keywords_TCL[] = #define highlighting_lexer_TXT2TAGS SCLEX_TXT2TAGS static const HLStyle highlighting_styles_TXT2TAGS[] = { - { SCE_TXT2TAGS_DEFAULT, "default", FALSE }, - { SCE_TXT2TAGS_LINE_BEGIN, "default", FALSE }, /* XIFME: remappings should be avoided */ - { SCE_TXT2TAGS_PRECHAR, "default", FALSE }, - { SCE_TXT2TAGS_STRONG1, "strong", FALSE }, - { SCE_TXT2TAGS_STRONG2, "strong", FALSE }, - { SCE_TXT2TAGS_EM1, "emphasis", FALSE }, - { SCE_TXT2TAGS_EM2, "underlined", FALSE }, /* WTF? */ - { SCE_TXT2TAGS_HEADER1, "header1", FALSE }, - { SCE_TXT2TAGS_HEADER2, "header2", FALSE }, - { SCE_TXT2TAGS_HEADER3, "header3", FALSE }, - { SCE_TXT2TAGS_HEADER4, "header4", FALSE }, - { SCE_TXT2TAGS_HEADER5, "header5", FALSE }, - { SCE_TXT2TAGS_HEADER6, "header6", FALSE }, - { SCE_TXT2TAGS_ULIST_ITEM, "ulist_item", FALSE }, - { SCE_TXT2TAGS_OLIST_ITEM, "olist_item", FALSE }, - { SCE_TXT2TAGS_BLOCKQUOTE, "blockquote", FALSE }, - { SCE_TXT2TAGS_STRIKEOUT, "strikeout", FALSE }, - { SCE_TXT2TAGS_HRULE, "hrule", FALSE }, - { SCE_TXT2TAGS_LINK, "link", FALSE }, - { SCE_TXT2TAGS_CODE, "code", FALSE }, - { SCE_TXT2TAGS_CODE2, "code", FALSE }, - { SCE_TXT2TAGS_CODEBK, "codebk", FALSE }, - { SCE_TXT2TAGS_COMMENT, "comment", FALSE }, - { SCE_TXT2TAGS_OPTION, "option", FALSE }, - { SCE_TXT2TAGS_PREPROC, "preproc", FALSE }, - { SCE_TXT2TAGS_POSTPROC, "postproc", FALSE } + { SCE_TXT2TAGS_DEFAULT, "default", FALSE, FALSE }, + { SCE_TXT2TAGS_LINE_BEGIN, "default", FALSE, FALSE }, /* XIFME: remappings should be avoided */ + { SCE_TXT2TAGS_PRECHAR, "default", FALSE, FALSE }, + { SCE_TXT2TAGS_STRONG1, "strong", FALSE, FALSE }, + { SCE_TXT2TAGS_STRONG2, "strong", FALSE, FALSE }, + { SCE_TXT2TAGS_EM1, "emphasis", FALSE, FALSE }, + { SCE_TXT2TAGS_EM2, "underlined", FALSE, FALSE }, /* WTF? */ + { SCE_TXT2TAGS_HEADER1, "header1", FALSE, FALSE }, + { SCE_TXT2TAGS_HEADER2, "header2", FALSE, FALSE }, + { SCE_TXT2TAGS_HEADER3, "header3", FALSE, FALSE }, + { SCE_TXT2TAGS_HEADER4, "header4", FALSE, FALSE }, + { SCE_TXT2TAGS_HEADER5, "header5", FALSE, FALSE }, + { SCE_TXT2TAGS_HEADER6, "header6", FALSE, FALSE }, + { SCE_TXT2TAGS_ULIST_ITEM, "ulist_item", FALSE, FALSE }, + { SCE_TXT2TAGS_OLIST_ITEM, "olist_item", FALSE, FALSE }, + { SCE_TXT2TAGS_BLOCKQUOTE, "blockquote", FALSE, FALSE }, + { SCE_TXT2TAGS_STRIKEOUT, "strikeout", FALSE, FALSE }, + { SCE_TXT2TAGS_HRULE, "hrule", FALSE, FALSE }, + { SCE_TXT2TAGS_LINK, "link", FALSE, FALSE }, + { SCE_TXT2TAGS_CODE, "code", FALSE, FALSE }, + { SCE_TXT2TAGS_CODE2, "code", FALSE, FALSE }, + { SCE_TXT2TAGS_CODEBK, "codebk", FALSE, FALSE }, + { SCE_TXT2TAGS_COMMENT, "comment", FALSE, FALSE }, + { SCE_TXT2TAGS_OPTION, "option", FALSE, FALSE }, + { SCE_TXT2TAGS_PREPROC, "preproc", FALSE, FALSE }, + { SCE_TXT2TAGS_POSTPROC, "postproc", FALSE, FALSE } }; #define highlighting_keywords_TXT2TAGS EMPTY_KEYWORDS #define highlighting_properties_TXT2TAGS EMPTY_PROPERTIES @@ -1656,22 +1657,22 @@ static const HLStyle highlighting_styles_TXT2TAGS[] = #define highlighting_lexer_VHDL SCLEX_VHDL static const HLStyle highlighting_styles_VHDL[] = { - { SCE_VHDL_DEFAULT, "default", FALSE }, - { SCE_VHDL_COMMENT, "comment", FALSE }, - { SCE_VHDL_COMMENTLINEBANG, "comment_line_bang", FALSE }, - { SCE_VHDL_BLOCK_COMMENT, "block_comment", FALSE }, - { SCE_VHDL_NUMBER, "number", FALSE }, - { SCE_VHDL_STRING, "string", FALSE }, - { SCE_VHDL_OPERATOR, "operator", FALSE }, - { SCE_VHDL_IDENTIFIER, "identifier", FALSE }, - { SCE_VHDL_STRINGEOL, "stringeol", FALSE }, - { SCE_VHDL_KEYWORD, "keyword", FALSE }, - { SCE_VHDL_STDOPERATOR, "stdoperator", FALSE }, - { SCE_VHDL_ATTRIBUTE, "attribute", FALSE }, - { SCE_VHDL_STDFUNCTION, "stdfunction", FALSE }, - { SCE_VHDL_STDPACKAGE, "stdpackage", FALSE }, - { SCE_VHDL_STDTYPE, "stdtype", FALSE }, - { SCE_VHDL_USERWORD, "userword", FALSE } + { SCE_VHDL_DEFAULT, "default", FALSE, FALSE }, + { SCE_VHDL_COMMENT, "comment", FALSE, FALSE }, + { SCE_VHDL_COMMENTLINEBANG, "comment_line_bang", FALSE, FALSE }, + { SCE_VHDL_BLOCK_COMMENT, "block_comment", FALSE, FALSE }, + { SCE_VHDL_NUMBER, "number", FALSE, FALSE }, + { SCE_VHDL_STRING, "string", FALSE, FALSE }, + { SCE_VHDL_OPERATOR, "operator", FALSE, FALSE }, + { SCE_VHDL_IDENTIFIER, "identifier", FALSE, FALSE }, + { SCE_VHDL_STRINGEOL, "stringeol", FALSE, FALSE }, + { SCE_VHDL_KEYWORD, "keyword", FALSE, FALSE }, + { SCE_VHDL_STDOPERATOR, "stdoperator", FALSE, FALSE }, + { SCE_VHDL_ATTRIBUTE, "attribute", FALSE, FALSE }, + { SCE_VHDL_STDFUNCTION, "stdfunction", FALSE, FALSE }, + { SCE_VHDL_STDPACKAGE, "stdpackage", FALSE, FALSE }, + { SCE_VHDL_STDTYPE, "stdtype", FALSE, FALSE }, + { SCE_VHDL_USERWORD, "userword", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_VHDL[] = { @@ -1690,25 +1691,25 @@ static const HLKeyword highlighting_keywords_VHDL[] = #define highlighting_lexer_VERILOG SCLEX_VERILOG static const HLStyle highlighting_styles_VERILOG[] = { - { SCE_V_DEFAULT, "default", FALSE }, - { SCE_V_COMMENT, "comment", FALSE }, - { SCE_V_COMMENTLINE, "comment_line", FALSE }, - { SCE_V_COMMENTLINEBANG, "comment_line_bang", FALSE }, - { SCE_V_NUMBER, "number", FALSE }, - { SCE_V_WORD, "word", FALSE }, - { SCE_V_STRING, "string", FALSE }, - { SCE_V_WORD2, "word2", FALSE }, - { SCE_V_WORD3, "word3", FALSE }, - { SCE_V_PREPROCESSOR, "preprocessor", FALSE }, - { SCE_V_OPERATOR, "operator", FALSE }, - { SCE_V_IDENTIFIER, "identifier", FALSE }, - { SCE_V_STRINGEOL, "stringeol", FALSE }, - { SCE_V_USER, "userword", FALSE }, - { SCE_V_COMMENT_WORD, "comment_word", FALSE }, - { SCE_V_INPUT, "input", FALSE }, - { SCE_V_OUTPUT, "output", FALSE }, - { SCE_V_INOUT, "inout", FALSE }, - { SCE_V_PORT_CONNECT, "port_connect", FALSE } + { SCE_V_DEFAULT, "default", FALSE, FALSE }, + { SCE_V_COMMENT, "comment", FALSE, FALSE }, + { SCE_V_COMMENTLINE, "comment_line", FALSE, FALSE }, + { SCE_V_COMMENTLINEBANG, "comment_line_bang", FALSE, FALSE }, + { SCE_V_NUMBER, "number", FALSE, FALSE }, + { SCE_V_WORD, "word", FALSE, FALSE }, + { SCE_V_STRING, "string", FALSE, FALSE }, + { SCE_V_WORD2, "word2", FALSE, FALSE }, + { SCE_V_WORD3, "word3", FALSE, FALSE }, + { SCE_V_PREPROCESSOR, "preprocessor", FALSE, FALSE }, + { SCE_V_OPERATOR, "operator", FALSE, FALSE }, + { SCE_V_IDENTIFIER, "identifier", FALSE, FALSE }, + { SCE_V_STRINGEOL, "stringeol", FALSE, FALSE }, + { SCE_V_USER, "userword", FALSE, FALSE }, + { SCE_V_COMMENT_WORD, "comment_word", FALSE, FALSE }, + { SCE_V_INPUT, "input", FALSE, FALSE }, + { SCE_V_OUTPUT, "output", FALSE, FALSE }, + { SCE_V_INOUT, "inout", FALSE, FALSE }, + { SCE_V_PORT_CONNECT, "port_connect", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_VERILOG[] = { @@ -1734,16 +1735,16 @@ static const HLKeyword highlighting_keywords_XML[] = #define highlighting_lexer_YAML SCLEX_YAML static const HLStyle highlighting_styles_YAML[] = { - { SCE_YAML_DEFAULT, "default", FALSE }, - { SCE_YAML_COMMENT, "comment", FALSE }, - { SCE_YAML_IDENTIFIER, "identifier", FALSE }, - { SCE_YAML_KEYWORD, "keyword", FALSE }, - { SCE_YAML_NUMBER, "number", FALSE }, - { SCE_YAML_REFERENCE, "reference", FALSE }, - { SCE_YAML_DOCUMENT, "document", FALSE }, - { SCE_YAML_TEXT, "text", FALSE }, - { SCE_YAML_ERROR, "error", FALSE }, - { SCE_YAML_OPERATOR, "operator", FALSE } + { SCE_YAML_DEFAULT, "default", FALSE, FALSE }, + { SCE_YAML_COMMENT, "comment", FALSE, FALSE }, + { SCE_YAML_IDENTIFIER, "identifier", FALSE, FALSE }, + { SCE_YAML_KEYWORD, "keyword", FALSE, FALSE }, + { SCE_YAML_NUMBER, "number", FALSE, FALSE }, + { SCE_YAML_REFERENCE, "reference", FALSE, FALSE }, + { SCE_YAML_DOCUMENT, "document", FALSE, FALSE }, + { SCE_YAML_TEXT, "text", FALSE, FALSE }, + { SCE_YAML_ERROR, "error", FALSE, FALSE }, + { SCE_YAML_OPERATOR, "operator", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_YAML[] = { @@ -1763,22 +1764,22 @@ static const HLKeyword highlighting_keywords_YAML[] = #define highlighting_lexer_AU3 SCLEX_AU3 static const HLStyle highlighting_styles_AU3[] = { - { SCE_AU3_DEFAULT, "default", FALSE}, - { SCE_AU3_COMMENT, "comment", FALSE}, - { SCE_AU3_COMMENTBLOCK, "commentblock", FALSE}, - { SCE_AU3_NUMBER, "number", FALSE}, - { SCE_AU3_FUNCTION, "function", FALSE}, - { SCE_AU3_KEYWORD, "keyword", FALSE}, - { SCE_AU3_MACRO, "macro", FALSE}, - { SCE_AU3_STRING, "string", FALSE}, - { SCE_AU3_OPERATOR, "operator", FALSE}, - { SCE_AU3_VARIABLE, "variable", FALSE}, - { SCE_AU3_SENT, "sent", FALSE}, - { SCE_AU3_PREPROCESSOR, "preprocessor", FALSE}, - { SCE_AU3_SPECIAL, "special", FALSE}, - { SCE_AU3_EXPAND, "expand", FALSE}, - { SCE_AU3_COMOBJ, "comobj", FALSE}, - { SCE_AU3_UDF, "udf", FALSE} + { SCE_AU3_DEFAULT, "default", FALSE, FALSE }, + { SCE_AU3_COMMENT, "comment", FALSE, FALSE }, + { SCE_AU3_COMMENTBLOCK, "commentblock", FALSE, FALSE }, + { SCE_AU3_NUMBER, "number", FALSE, FALSE }, + { SCE_AU3_FUNCTION, "function", FALSE, FALSE }, + { SCE_AU3_KEYWORD, "keyword", FALSE, FALSE }, + { SCE_AU3_MACRO, "macro", FALSE, FALSE }, + { SCE_AU3_STRING, "string", FALSE, FALSE }, + { SCE_AU3_OPERATOR, "operator", FALSE, FALSE }, + { SCE_AU3_VARIABLE, "variable", FALSE, FALSE }, + { SCE_AU3_SENT, "sent", FALSE, FALSE }, + { SCE_AU3_PREPROCESSOR, "preprocessor", FALSE, FALSE }, + { SCE_AU3_SPECIAL, "special", FALSE, FALSE }, + { SCE_AU3_EXPAND, "expand", FALSE, FALSE }, + { SCE_AU3_COMOBJ, "comobj", FALSE, FALSE }, + { SCE_AU3_UDF, "udf", FALSE, FALSE } }; static const HLKeyword highlighting_keywords_AU3[] = { diff --git a/src/sciwrappers.c b/src/sciwrappers.c index a25307302b..3cd8cde25a 100644 --- a/src/sciwrappers.c +++ b/src/sciwrappers.c @@ -1104,7 +1104,7 @@ void sci_marker_delete_all(ScintillaObject *sci, gint marker) GEANY_API_SYMBOL gint sci_get_style_at(ScintillaObject *sci, gint position) { - return (gint) SSM(sci, SCI_GETSTYLEAT, (uptr_t) position, 0); + return (gint) SSM(sci, SCI_GETSTYLEINDEXAT, (uptr_t) position, 0); } @@ -1497,3 +1497,14 @@ gint sci_word_end_position(ScintillaObject *sci, gint position, gboolean onlyWor { return SSM(sci, SCI_WORDENDPOSITION, position, onlyWordCharacters); } + +gint sci_get_style_from_substyle(ScintillaObject *sci, gint style) +{ + return SSM(sci, SCI_GETSTYLEFROMSUBSTYLE, style, 0); +} + +/* Same as sci_get_style_at() but returns the base style in case of substyles */ +gint sci_get_base_style_at(ScintillaObject *sci, gint position) +{ + return sci_get_style_from_substyle(sci, sci_get_style_at(sci, position)); +} diff --git a/src/sciwrappers.h b/src/sciwrappers.h index 0f3cf2da65..ee1bfcd3b0 100644 --- a/src/sciwrappers.h +++ b/src/sciwrappers.h @@ -220,6 +220,9 @@ void sci_move_selected_lines_up (ScintillaObject *sci); void sci_set_font_fractional (ScintillaObject *sci, gint style, const gchar *font, gdouble size); +gint sci_get_style_from_substyle (ScintillaObject *sci, gint style); +gint sci_get_base_style_at (ScintillaObject *sci, gint position); + #endif /* GEANY_PRIVATE */ G_END_DECLS diff --git a/src/symbols.c b/src/symbols.c index 244eb40adb..84c8060559 100644 --- a/src/symbols.c +++ b/src/symbols.c @@ -1766,11 +1766,11 @@ static gchar *parse_function_at_line(ScintillaObject *sci, gint tag_line) } start = sci_get_position_from_line(sci, tag_line - 2); max_pos = sci_get_position_from_line(sci, tag_line + 1); - while (start < max_pos && sci_get_style_at(sci, start) != fn_style) + while (start < max_pos && sci_get_base_style_at(sci, start) != fn_style) start++; end = start; - while (end < max_pos && sci_get_style_at(sci, end) == fn_style) + while (end < max_pos && sci_get_base_style_at(sci, end) == fn_style) end++; if (start == end) @@ -1807,7 +1807,7 @@ static gchar *parse_cpp_function_at_line(ScintillaObject *sci, gint tag_line) start = end; /* Use tmp to find SCE_C_IDENTIFIER or SCE_C_GLOBALCLASS chars */ - while (start >= 0 && ((tmp = sci_get_style_at(sci, start)) == SCE_C_IDENTIFIER + while (start >= 0 && ((tmp = sci_get_base_style_at(sci, start)) == SCE_C_IDENTIFIER || tmp == SCE_C_GLOBALCLASS || (c = sci_get_char_at(sci, start)) == '~' || c == ':')) @@ -1820,8 +1820,9 @@ static gchar *parse_cpp_function_at_line(ScintillaObject *sci, gint tag_line) /* gets the fold header after or on @line, but skipping folds created because of parentheses */ -static gint get_fold_header_after(ScintillaObject *sci, gint line) +static gint get_fold_header_after(GeanyEditor *editor, gint line) { + ScintillaObject *const sci = editor->sci; const gint line_count = sci_get_line_count(sci); for (; line < line_count; line++) @@ -1830,14 +1831,13 @@ static gint get_fold_header_after(ScintillaObject *sci, gint line) { const gint last_child = SSM(sci, SCI_GETLASTCHILD, line, -1); const gint line_end = sci_get_line_end_position(sci, line); - const gint lexer = sci_get_lexer(sci); gint parenthesis_match_line = -1; /* now find any unbalanced open parenthesis on the line and see where the matching * brace would be, mimicking what folding on () does */ for (gint pos = sci_get_position_from_line(sci, line); pos < line_end; pos++) { - if (highlighting_is_code_style(lexer, sci_get_style_at(sci, pos)) && + if (editor_is_code_at(editor, pos) && sci_get_char_at(sci, pos) == '(') { const gint matching = sci_find_matching_brace(sci, pos); @@ -1895,7 +1895,7 @@ static gint get_current_tag_name(GeanyDocument *doc, gchar **tagname, TMTagType * by folding on () in case the parameter list spans multiple lines */ if (abs(tag_line - parent) > 1) { - const gint tag_fold = get_fold_header_after(doc->editor->sci, tag_line); + const gint tag_fold = get_fold_header_after(doc->editor, tag_line); if (tag_fold >= 0) last_child = SSM(doc->editor->sci, SCI_GETLASTCHILD, tag_fold, -1); } diff --git a/src/ui_utils.c b/src/ui_utils.c index 60787c8f86..a7050d48fb 100644 --- a/src/ui_utils.c +++ b/src/ui_utils.c @@ -298,10 +298,20 @@ static gchar *create_statusbar_statistics(GeanyDocument *doc, g_string_append(stats_str, cur_tag); break; case 'Y': + { + gint style = sci_get_style_at(doc->editor->sci, pos); + gint base_style = scintilla_send_message(doc->editor->sci, SCI_GETSTYLEFROMSUBSTYLE, style, 0); + g_string_append_c(stats_str, ' '); - g_string_append_printf(stats_str, "%d", - sci_get_style_at(doc->editor->sci, pos)); + g_string_append_printf(stats_str, "%d", base_style); + if (base_style != style) + { + gint sub_start = scintilla_send_message(doc->editor->sci, SCI_GETSUBSTYLESSTART, base_style, 0); + + g_string_append_printf(stats_str, ".%d", style + 1 - sub_start); + } break; + } default: g_string_append_len(stats_str, expos, 1); }