#pragma once // Generated by vendor/gen-registry.mjs. Do not edit. namespace Markdown { static const char kHighlightsQuery_json[] = "(pair\n" " key: (_) @string.special.key)\n" "\n" "(string) @string\n" "\n" "(number) @number\n" "\n" "[\n" " (null)\n" " (true)\n" " (false)\n" "] @constant.builtin\n" "\n" "(escape_sequence) @escape\n" "\n" "(comment) @comment\n" ""; static const char kHighlightsQuery_html[] = "(tag_name) @tag\n" "(erroneous_end_tag_name) @tag.error\n" "(doctype) @constant\n" "(attribute_name) @attribute\n" "(attribute_value) @string\n" "(comment) @comment\n" "\n" "[\n" " \"<\"\n" " \">\"\n" " \"\"\n" "] @punctuation.bracket\n" ""; static const char kHighlightsQuery_css[] = "(comment) @comment\n" "\n" "(tag_name) @tag\n" "(nesting_selector) @tag\n" "(universal_selector) @tag\n" "\n" "\"~\" @operator\n" "\">\" @operator\n" "\"+\" @operator\n" "\"-\" @operator\n" "\"*\" @operator\n" "\"/\" @operator\n" "\"=\" @operator\n" "\"^=\" @operator\n" "\"|=\" @operator\n" "\"~=\" @operator\n" "\"$=\" @operator\n" "\"*=\" @operator\n" "\n" "\"and\" @operator\n" "\"or\" @operator\n" "\"not\" @operator\n" "\"only\" @operator\n" "\n" "(attribute_selector (plain_value) @string)\n" "(pseudo_element_selector (tag_name) @attribute)\n" "(pseudo_class_selector (class_name) @attribute)\n" "\n" "(class_name) @property\n" "(id_name) @property\n" "(namespace_name) @property\n" "(property_name) @property\n" "(feature_name) @property\n" "\n" "(attribute_name) @attribute\n" "\n" "(function_name) @function\n" "\n" "((property_name) @variable\n" " (#match\? @variable \"^--\"))\n" "((plain_value) @variable\n" " (#match\? @variable \"^--\"))\n" "\n" "\"@media\" @keyword\n" "\"@import\" @keyword\n" "\"@charset\" @keyword\n" "\"@namespace\" @keyword\n" "\"@supports\" @keyword\n" "\"@keyframes\" @keyword\n" "(at_keyword) @keyword\n" "(to) @keyword\n" "(from) @keyword\n" "(important) @keyword\n" "\n" "(string_value) @string\n" "(color_value) @string.special\n" "\n" "(integer_value) @number\n" "(float_value) @number\n" "(unit) @type\n" "\n" "\"#\" @punctuation.delimiter\n" "\",\" @punctuation.delimiter\n" "\":\" @punctuation.delimiter\n" ""; static const char kHighlightsQuery_markdown[] = ";From nvim-treesitter/nvim-treesitter\n" "(atx_heading (inline) @text.title)\n" "(setext_heading (paragraph) @text.title)\n" "\n" "[\n" " (atx_h1_marker)\n" " (atx_h2_marker)\n" " (atx_h3_marker)\n" " (atx_h4_marker)\n" " (atx_h5_marker)\n" " (atx_h6_marker)\n" " (setext_h1_underline)\n" " (setext_h2_underline)\n" "] @punctuation.special\n" "\n" "[\n" " (link_title)\n" " (indented_code_block)\n" " (fenced_code_block)\n" "] @text.literal\n" "\n" "[\n" " (fenced_code_block_delimiter)\n" "] @punctuation.delimiter\n" "\n" "(code_fence_content) @none\n" "\n" "[\n" " (link_destination)\n" "] @text.uri\n" "\n" "[\n" " (link_label)\n" "] @text.reference\n" "\n" "[\n" " (list_marker_plus)\n" " (list_marker_minus)\n" " (list_marker_star)\n" " (list_marker_dot)\n" " (list_marker_parenthesis)\n" " (thematic_break)\n" "] @punctuation.special\n" "\n" "[\n" " (block_continuation)\n" " (block_quote_marker)\n" "] @punctuation.special\n" "\n" "[\n" " (backslash_escape)\n" "] @string.escape\n" ""; static const char kHighlightsQuery_yaml[] = "(boolean_scalar) @boolean\n" "\n" "(null_scalar) @constant.builtin\n" "\n" "[\n" " (double_quote_scalar)\n" " (single_quote_scalar)\n" " (block_scalar)\n" " (string_scalar)\n" "] @string\n" "\n" "[\n" " (integer_scalar)\n" " (float_scalar)\n" "] @number\n" "\n" "(comment) @comment\n" "\n" "[\n" " (anchor_name)\n" " (alias_name)\n" "] @label\n" "\n" "(tag) @type\n" "\n" "[\n" " (yaml_directive)\n" " (tag_directive)\n" " (reserved_directive)\n" "] @attribute\n" "\n" "(block_mapping_pair\n" " key: (flow_node\n" " [\n" " (double_quote_scalar)\n" " (single_quote_scalar)\n" " ] @property))\n" "\n" "(block_mapping_pair\n" " key: (flow_node\n" " (plain_scalar\n" " (string_scalar) @property)))\n" "\n" "(flow_mapping\n" " (_\n" " key: (flow_node\n" " [\n" " (double_quote_scalar)\n" " (single_quote_scalar)\n" " ] @property)))\n" "\n" "(flow_mapping\n" " (_\n" " key: (flow_node\n" " (plain_scalar\n" " (string_scalar) @property))))\n" "\n" "[\n" " \",\"\n" " \"-\"\n" " \":\"\n" " \">\"\n" " \"\?\"\n" " \"|\"\n" "] @punctuation.delimiter\n" "\n" "[\n" " \"[\"\n" " \"]\"\n" " \"{\"\n" " \"}\"\n" "] @punctuation.bracket\n" "\n" "[\n" " \"*\"\n" " \"&\"\n" " \"---\"\n" " \"...\"\n" "] @punctuation.special\n" ""; static const char kHighlightsQuery_go[] = "; Function calls\n" "\n" "(call_expression\n" " function: (identifier) @function)\n" "\n" "(call_expression\n" " function: (identifier) @function.builtin\n" " (#match\? @function.builtin \"^(append|cap|close|complex|copy|delete|imag|len|make|new|panic|print|println|real|recover)$\"))\n" "\n" "(call_expression\n" " function: (selector_expression\n" " field: (field_identifier) @function.method))\n" "\n" "; Function definitions\n" "\n" "(function_declaration\n" " name: (identifier) @function)\n" "\n" "(method_declaration\n" " name: (field_identifier) @function.method)\n" "\n" "; Identifiers\n" "\n" "(type_identifier) @type\n" "(field_identifier) @property\n" "(identifier) @variable\n" "\n" "; Operators\n" "\n" "[\n" " \"--\"\n" " \"-\"\n" " \"-=\"\n" " \":=\"\n" " \"!\"\n" " \"!=\"\n" " \"...\"\n" " \"*\"\n" " \"*\"\n" " \"*=\"\n" " \"/\"\n" " \"/=\"\n" " \"&\"\n" " \"&&\"\n" " \"&=\"\n" " \"%\"\n" " \"%=\"\n" " \"^\"\n" " \"^=\"\n" " \"+\"\n" " \"++\"\n" " \"+=\"\n" " \"<-\"\n" " \"<\"\n" " \"<<\"\n" " \"<<=\"\n" " \"<=\"\n" " \"=\"\n" " \"==\"\n" " \">\"\n" " \">=\"\n" " \">>\"\n" " \">>=\"\n" " \"|\"\n" " \"|=\"\n" " \"||\"\n" " \"~\"\n" "] @operator\n" "\n" "; Keywords\n" "\n" "[\n" " \"break\"\n" " \"case\"\n" " \"chan\"\n" " \"const\"\n" " \"continue\"\n" " \"default\"\n" " \"defer\"\n" " \"else\"\n" " \"fallthrough\"\n" " \"for\"\n" " \"func\"\n" " \"go\"\n" " \"goto\"\n" " \"if\"\n" " \"import\"\n" " \"interface\"\n" " \"map\"\n" " \"package\"\n" " \"range\"\n" " \"return\"\n" " \"select\"\n" " \"struct\"\n" " \"switch\"\n" " \"type\"\n" " \"var\"\n" "] @keyword\n" "\n" "; Literals\n" "\n" "[\n" " (interpreted_string_literal)\n" " (raw_string_literal)\n" " (rune_literal)\n" "] @string\n" "\n" "(escape_sequence) @escape\n" "\n" "[\n" " (int_literal)\n" " (float_literal)\n" " (imaginary_literal)\n" "] @number\n" "\n" "[\n" " (true)\n" " (false)\n" " (nil)\n" " (iota)\n" "] @constant.builtin\n" "\n" "(comment) @comment\n" ""; static const char kHighlightsQuery_java[] = "; Variables\n" "\n" "(identifier) @variable\n" "\n" "; Methods\n" "\n" "(method_declaration\n" " name: (identifier) @function.method)\n" "(method_invocation\n" " name: (identifier) @function.method)\n" "(super) @function.builtin\n" "\n" "; Annotations\n" "\n" "(annotation\n" " name: (identifier) @attribute)\n" "(marker_annotation\n" " name: (identifier) @attribute)\n" "\n" "\"@\" @operator\n" "\n" "; Types\n" "\n" "(type_identifier) @type\n" "\n" "(interface_declaration\n" " name: (identifier) @type)\n" "(class_declaration\n" " name: (identifier) @type)\n" "(enum_declaration\n" " name: (identifier) @type)\n" "\n" "((field_access\n" " object: (identifier) @type)\n" " (#match\? @type \"^[A-Z]\"))\n" "((scoped_identifier\n" " scope: (identifier) @type)\n" " (#match\? @type \"^[A-Z]\"))\n" "((method_invocation\n" " object: (identifier) @type)\n" " (#match\? @type \"^[A-Z]\"))\n" "((method_reference\n" " . (identifier) @type)\n" " (#match\? @type \"^[A-Z]\"))\n" "\n" "(constructor_declaration\n" " name: (identifier) @type)\n" "\n" "[\n" " (boolean_type)\n" " (integral_type)\n" " (floating_point_type)\n" " (floating_point_type)\n" " (void_type)\n" "] @type.builtin\n" "\n" "; Constants\n" "\n" "((identifier) @constant\n" " (#match\? @constant \"^_*[A-Z][A-Z\\\\d_]+$\"))\n" "\n" "; Builtins\n" "\n" "(this) @variable.builtin\n" "\n" "; Literals\n" "\n" "[\n" " (hex_integer_literal)\n" " (decimal_integer_literal)\n" " (octal_integer_literal)\n" " (decimal_floating_point_literal)\n" " (hex_floating_point_literal)\n" "] @number\n" "\n" "[\n" " (character_literal)\n" " (string_literal)\n" "] @string\n" "(escape_sequence) @string.escape\n" "\n" "[\n" " (true)\n" " (false)\n" " (null_literal)\n" "] @constant.builtin\n" "\n" "[\n" " (line_comment)\n" " (block_comment)\n" "] @comment\n" "\n" "; Keywords\n" "\n" "[\n" " \"abstract\"\n" " \"assert\"\n" " \"break\"\n" " \"case\"\n" " \"catch\"\n" " \"class\"\n" " \"continue\"\n" " \"default\"\n" " \"do\"\n" " \"else\"\n" " \"enum\"\n" " \"exports\"\n" " \"extends\"\n" " \"final\"\n" " \"finally\"\n" " \"for\"\n" " \"if\"\n" " \"implements\"\n" " \"import\"\n" " \"instanceof\"\n" " \"interface\"\n" " \"module\"\n" " \"native\"\n" " \"new\"\n" " \"non-sealed\"\n" " \"open\"\n" " \"opens\"\n" " \"package\"\n" " \"permits\"\n" " \"private\"\n" " \"protected\"\n" " \"provides\"\n" " \"public\"\n" " \"requires\"\n" " \"record\"\n" " \"return\"\n" " \"sealed\"\n" " \"static\"\n" " \"strictfp\"\n" " \"switch\"\n" " \"synchronized\"\n" " \"throw\"\n" " \"throws\"\n" " \"to\"\n" " \"transient\"\n" " \"transitive\"\n" " \"try\"\n" " \"uses\"\n" " \"volatile\"\n" " \"when\"\n" " \"while\"\n" " \"with\"\n" " \"yield\"\n" "] @keyword\n" ""; static const char kHighlightsQuery_javascript[] = "; Variables\n" ";----------\n" "\n" "(identifier) @variable\n" "\n" "; Properties\n" ";-----------\n" "\n" "(property_identifier) @property\n" "\n" "; Function and method definitions\n" ";--------------------------------\n" "\n" "(function_expression\n" " name: (identifier) @function)\n" "(function_declaration\n" " name: (identifier) @function)\n" "(method_definition\n" " name: (property_identifier) @function.method)\n" "\n" "(pair\n" " key: (property_identifier) @function.method\n" " value: [(function_expression) (arrow_function)])\n" "\n" "(assignment_expression\n" " left: (member_expression\n" " property: (property_identifier) @function.method)\n" " right: [(function_expression) (arrow_function)])\n" "\n" "(variable_declarator\n" " name: (identifier) @function\n" " value: [(function_expression) (arrow_function)])\n" "\n" "(assignment_expression\n" " left: (identifier) @function\n" " right: [(function_expression) (arrow_function)])\n" "\n" "; Function and method calls\n" ";--------------------------\n" "\n" "(call_expression\n" " function: (identifier) @function)\n" "\n" "(call_expression\n" " function: (member_expression\n" " property: (property_identifier) @function.method))\n" "\n" "; Special identifiers\n" ";--------------------\n" "\n" "((identifier) @constructor\n" " (#match\? @constructor \"^[A-Z]\"))\n" "\n" "([\n" " (identifier)\n" " (shorthand_property_identifier)\n" " (shorthand_property_identifier_pattern)\n" " ] @constant\n" " (#match\? @constant \"^[A-Z_][A-Z\\\\d_]+$\"))\n" "\n" "((identifier) @variable.builtin\n" " (#match\? @variable.builtin \"^(arguments|module|console|window|document)$\")\n" " (#is-not\? local))\n" "\n" "((identifier) @function.builtin\n" " (#eq\? @function.builtin \"require\")\n" " (#is-not\? local))\n" "\n" "; Literals\n" ";---------\n" "\n" "(this) @variable.builtin\n" "(super) @variable.builtin\n" "\n" "[\n" " (true)\n" " (false)\n" " (null)\n" " (undefined)\n" "] @constant.builtin\n" "\n" "(comment) @comment\n" "\n" "[\n" " (string)\n" " (template_string)\n" "] @string\n" "\n" "(regex) @string.special\n" "(number) @number\n" "\n" "; Tokens\n" ";-------\n" "\n" "[\n" " \";\"\n" " (optional_chain)\n" " \".\"\n" " \",\"\n" "] @punctuation.delimiter\n" "\n" "[\n" " \"-\"\n" " \"--\"\n" " \"-=\"\n" " \"+\"\n" " \"++\"\n" " \"+=\"\n" " \"*\"\n" " \"*=\"\n" " \"**\"\n" " \"**=\"\n" " \"/\"\n" " \"/=\"\n" " \"%\"\n" " \"%=\"\n" " \"<\"\n" " \"<=\"\n" " \"<<\"\n" " \"<<=\"\n" " \"=\"\n" " \"==\"\n" " \"===\"\n" " \"!\"\n" " \"!=\"\n" " \"!==\"\n" " \"=>\"\n" " \">\"\n" " \">=\"\n" " \">>\"\n" " \">>=\"\n" " \">>>\"\n" " \">>>=\"\n" " \"~\"\n" " \"^\"\n" " \"&\"\n" " \"|\"\n" " \"^=\"\n" " \"&=\"\n" " \"|=\"\n" " \"&&\"\n" " \"||\"\n" " \"\?\?\"\n" " \"&&=\"\n" " \"||=\"\n" " \"\?\?=\"\n" "] @operator\n" "\n" "[\n" " \"(\"\n" " \")\"\n" " \"[\"\n" " \"]\"\n" " \"{\"\n" " \"}\"\n" "] @punctuation.bracket\n" "\n" "(template_substitution\n" " \"${\" @punctuation.special\n" " \"}\" @punctuation.special) @embedded\n" "\n" "[\n" " \"as\"\n" " \"async\"\n" " \"await\"\n" " \"break\"\n" " \"case\"\n" " \"catch\"\n" " \"class\"\n" " \"const\"\n" " \"continue\"\n" " \"debugger\"\n" " \"default\"\n" " \"delete\"\n" " \"do\"\n" " \"else\"\n" " \"export\"\n" " \"extends\"\n" " \"finally\"\n" " \"for\"\n" " \"from\"\n" " \"function\"\n" " \"get\"\n" " \"if\"\n" " \"import\"\n" " \"in\"\n" " \"instanceof\"\n" " \"let\"\n" " \"new\"\n" " \"of\"\n" " \"return\"\n" " \"set\"\n" " \"static\"\n" " \"switch\"\n" " \"target\"\n" " \"throw\"\n" " \"try\"\n" " \"typeof\"\n" " \"var\"\n" " \"void\"\n" " \"while\"\n" " \"with\"\n" " \"yield\"\n" "] @keyword\n" ""; static const char kHighlightsQuery_python[] = "; Identifier naming conventions\n" "\n" "(identifier) @variable\n" "\n" "((identifier) @constructor\n" " (#match\? @constructor \"^[A-Z]\"))\n" "\n" "((identifier) @constant\n" " (#match\? @constant \"^[A-Z][A-Z_]*$\"))\n" "\n" "; Function calls\n" "\n" "(decorator) @function\n" "(decorator\n" " (identifier) @function)\n" "\n" "(call\n" " function: (attribute attribute: (identifier) @function.method))\n" "(call\n" " function: (identifier) @function)\n" "\n" "; Builtin functions\n" "\n" "((call\n" " function: (identifier) @function.builtin)\n" " (#match\?\n" " @function.builtin\n" " \"^(abs|all|any|ascii|bin|bool|breakpoint|bytearray|bytes|callable|chr|classmethod|compile|complex|delattr|dict|dir|divmod|enumerate|eval|exec|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|isinstance|issubclass|iter|len|list|locals|map|max|memoryview|min|next|object|oct|open|ord|pow|print|property|range|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|vars|zip|__import__)$\"))\n" "\n" "; Function definitions\n" "\n" "(function_definition\n" " name: (identifier) @function)\n" "\n" "(attribute attribute: (identifier) @property)\n" "(type (identifier) @type)\n" "\n" "; Literals\n" "\n" "[\n" " (none)\n" " (true)\n" " (false)\n" "] @constant.builtin\n" "\n" "[\n" " (integer)\n" " (float)\n" "] @number\n" "\n" "(comment) @comment\n" "(string) @string\n" "(escape_sequence) @escape\n" "\n" "(interpolation\n" " \"{\" @punctuation.special\n" " \"}\" @punctuation.special) @embedded\n" "\n" "[\n" " \"-\"\n" " \"-=\"\n" " \"!=\"\n" " \"*\"\n" " \"**\"\n" " \"**=\"\n" " \"*=\"\n" " \"/\"\n" " \"//\"\n" " \"//=\"\n" " \"/=\"\n" " \"&\"\n" " \"&=\"\n" " \"%\"\n" " \"%=\"\n" " \"^\"\n" " \"^=\"\n" " \"+\"\n" " \"->\"\n" " \"+=\"\n" " \"<\"\n" " \"<<\"\n" " \"<<=\"\n" " \"<=\"\n" " \"<>\"\n" " \"=\"\n" " \":=\"\n" " \"==\"\n" " \">\"\n" " \">=\"\n" " \">>\"\n" " \">>=\"\n" " \"|\"\n" " \"|=\"\n" " \"~\"\n" " \"@=\"\n" " \"and\"\n" " \"in\"\n" " \"is\"\n" " \"not\"\n" " \"or\"\n" " \"is not\"\n" " \"not in\"\n" "] @operator\n" "\n" "[\n" " \"as\"\n" " \"assert\"\n" " \"async\"\n" " \"await\"\n" " \"break\"\n" " \"class\"\n" " \"continue\"\n" " \"def\"\n" " \"del\"\n" " \"elif\"\n" " \"else\"\n" " \"except\"\n" " \"exec\"\n" " \"finally\"\n" " \"for\"\n" " \"from\"\n" " \"global\"\n" " \"if\"\n" " \"import\"\n" " \"lambda\"\n" " \"nonlocal\"\n" " \"pass\"\n" " \"print\"\n" " \"raise\"\n" " \"return\"\n" " \"try\"\n" " \"while\"\n" " \"with\"\n" " \"yield\"\n" " \"match\"\n" " \"case\"\n" "] @keyword\n" ""; static const char kHighlightsQuery_c[] = "(identifier) @variable\n" "\n" "((identifier) @constant\n" " (#match\? @constant \"^[A-Z][A-Z\\\\d_]*$\"))\n" "\n" "\"break\" @keyword\n" "\"case\" @keyword\n" "\"const\" @keyword\n" "\"continue\" @keyword\n" "\"default\" @keyword\n" "\"do\" @keyword\n" "\"else\" @keyword\n" "\"enum\" @keyword\n" "\"extern\" @keyword\n" "\"for\" @keyword\n" "\"if\" @keyword\n" "\"inline\" @keyword\n" "\"return\" @keyword\n" "\"sizeof\" @keyword\n" "\"static\" @keyword\n" "\"struct\" @keyword\n" "\"switch\" @keyword\n" "\"typedef\" @keyword\n" "\"union\" @keyword\n" "\"volatile\" @keyword\n" "\"while\" @keyword\n" "\n" "\"#define\" @keyword\n" "\"#elif\" @keyword\n" "\"#else\" @keyword\n" "\"#endif\" @keyword\n" "\"#if\" @keyword\n" "\"#ifdef\" @keyword\n" "\"#ifndef\" @keyword\n" "\"#include\" @keyword\n" "(preproc_directive) @keyword\n" "\n" "\"--\" @operator\n" "\"-\" @operator\n" "\"-=\" @operator\n" "\"->\" @operator\n" "\"=\" @operator\n" "\"!=\" @operator\n" "\"*\" @operator\n" "\"&\" @operator\n" "\"&&\" @operator\n" "\"+\" @operator\n" "\"++\" @operator\n" "\"+=\" @operator\n" "\"<\" @operator\n" "\"==\" @operator\n" "\">\" @operator\n" "\"||\" @operator\n" "\n" "\".\" @delimiter\n" "\";\" @delimiter\n" "\n" "(string_literal) @string\n" "(system_lib_string) @string\n" "\n" "(null) @constant\n" "(number_literal) @number\n" "(char_literal) @number\n" "\n" "(field_identifier) @property\n" "(statement_identifier) @label\n" "(type_identifier) @type\n" "(primitive_type) @type\n" "(sized_type_specifier) @type\n" "\n" "(call_expression\n" " function: (identifier) @function)\n" "(call_expression\n" " function: (field_expression\n" " field: (field_identifier) @function))\n" "(function_declarator\n" " declarator: (identifier) @function)\n" "(preproc_function_def\n" " name: (identifier) @function.special)\n" "\n" "(comment) @comment\n" ""; static const char kHighlightsQuery_rust[] = "; Identifiers\n" "\n" "(type_identifier) @type\n" "(primitive_type) @type.builtin\n" "(field_identifier) @property\n" "\n" "; Identifier conventions\n" "\n" "; Assume all-caps names are constants\n" "((identifier) @constant\n" " (#match\? @constant \"^[A-Z][A-Z\\\\d_]+$'\"))\n" "\n" "; Assume uppercase names are enum constructors\n" "((identifier) @constructor\n" " (#match\? @constructor \"^[A-Z]\"))\n" "\n" "; Assume that uppercase names in paths are types\n" "((scoped_identifier\n" " path: (identifier) @type)\n" " (#match\? @type \"^[A-Z]\"))\n" "((scoped_identifier\n" " path: (scoped_identifier\n" " name: (identifier) @type))\n" " (#match\? @type \"^[A-Z]\"))\n" "((scoped_type_identifier\n" " path: (identifier) @type)\n" " (#match\? @type \"^[A-Z]\"))\n" "((scoped_type_identifier\n" " path: (scoped_identifier\n" " name: (identifier) @type))\n" " (#match\? @type \"^[A-Z]\"))\n" "\n" "; Assume all qualified names in struct patterns are enum constructors. (They're\n" "; either that, or struct names; highlighting both as constructors seems to be\n" "; the less glaring choice of error, visually.)\n" "(struct_pattern\n" " type: (scoped_type_identifier\n" " name: (type_identifier) @constructor))\n" "\n" "; Function calls\n" "\n" "(call_expression\n" " function: (identifier) @function)\n" "(call_expression\n" " function: (field_expression\n" " field: (field_identifier) @function.method))\n" "(call_expression\n" " function: (scoped_identifier\n" " \"::\"\n" " name: (identifier) @function))\n" "\n" "(generic_function\n" " function: (identifier) @function)\n" "(generic_function\n" " function: (scoped_identifier\n" " name: (identifier) @function))\n" "(generic_function\n" " function: (field_expression\n" " field: (field_identifier) @function.method))\n" "\n" "(macro_invocation\n" " macro: (identifier) @function.macro\n" " \"!\" @function.macro)\n" "\n" "; Function definitions\n" "\n" "(function_item (identifier) @function)\n" "(function_signature_item (identifier) @function)\n" "\n" "(line_comment) @comment\n" "(block_comment) @comment\n" "\n" "(line_comment (doc_comment)) @comment.documentation\n" "(block_comment (doc_comment)) @comment.documentation\n" "\n" "\"(\" @punctuation.bracket\n" "\")\" @punctuation.bracket\n" "\"[\" @punctuation.bracket\n" "\"]\" @punctuation.bracket\n" "\"{\" @punctuation.bracket\n" "\"}\" @punctuation.bracket\n" "\n" "(type_arguments\n" " \"<\" @punctuation.bracket\n" " \">\" @punctuation.bracket)\n" "(type_parameters\n" " \"<\" @punctuation.bracket\n" " \">\" @punctuation.bracket)\n" "\n" "\"::\" @punctuation.delimiter\n" "\":\" @punctuation.delimiter\n" "\".\" @punctuation.delimiter\n" "\",\" @punctuation.delimiter\n" "\";\" @punctuation.delimiter\n" "\n" "(parameter (identifier) @variable.parameter)\n" "\n" "(lifetime (identifier) @label)\n" "\n" "\"as\" @keyword\n" "\"async\" @keyword\n" "\"await\" @keyword\n" "\"break\" @keyword\n" "\"const\" @keyword\n" "\"continue\" @keyword\n" "\"default\" @keyword\n" "\"dyn\" @keyword\n" "\"else\" @keyword\n" "\"enum\" @keyword\n" "\"extern\" @keyword\n" "\"fn\" @keyword\n" "\"for\" @keyword\n" "\"gen\" @keyword\n" "\"if\" @keyword\n" "\"impl\" @keyword\n" "\"in\" @keyword\n" "\"let\" @keyword\n" "\"loop\" @keyword\n" "\"macro_rules!\" @keyword\n" "\"match\" @keyword\n" "\"mod\" @keyword\n" "\"move\" @keyword\n" "\"pub\" @keyword\n" "\"raw\" @keyword\n" "\"ref\" @keyword\n" "\"return\" @keyword\n" "\"static\" @keyword\n" "\"struct\" @keyword\n" "\"trait\" @keyword\n" "\"type\" @keyword\n" "\"union\" @keyword\n" "\"unsafe\" @keyword\n" "\"use\" @keyword\n" "\"where\" @keyword\n" "\"while\" @keyword\n" "\"yield\" @keyword\n" "(crate) @keyword\n" "(mutable_specifier) @keyword\n" "(use_list (self) @keyword)\n" "(scoped_use_list (self) @keyword)\n" "(scoped_identifier (self) @keyword)\n" "(super) @keyword\n" "\n" "(self) @variable.builtin\n" "\n" "(char_literal) @string\n" "(string_literal) @string\n" "(raw_string_literal) @string\n" "\n" "(boolean_literal) @constant.builtin\n" "(integer_literal) @constant.builtin\n" "(float_literal) @constant.builtin\n" "\n" "(escape_sequence) @escape\n" "\n" "(attribute_item) @attribute\n" "(inner_attribute_item) @attribute\n" "\n" "\"*\" @operator\n" "\"&\" @operator\n" "\"'\" @operator\n" ""; static const char kHighlightsQuery_bash[] = "[\n" " (string)\n" " (raw_string)\n" " (heredoc_body)\n" " (heredoc_start)\n" "] @string\n" "\n" "(command_name) @function\n" "\n" "(variable_name) @property\n" "\n" "[\n" " \"case\"\n" " \"do\"\n" " \"done\"\n" " \"elif\"\n" " \"else\"\n" " \"esac\"\n" " \"export\"\n" " \"fi\"\n" " \"for\"\n" " \"function\"\n" " \"if\"\n" " \"in\"\n" " \"select\"\n" " \"then\"\n" " \"unset\"\n" " \"until\"\n" " \"while\"\n" "] @keyword\n" "\n" "(comment) @comment\n" "\n" "(function_definition name: (word) @function)\n" "\n" "(file_descriptor) @number\n" "\n" "[\n" " (command_substitution)\n" " (process_substitution)\n" " (expansion)\n" "]@embedded\n" "\n" "[\n" " \"$\"\n" " \"&&\"\n" " \">\"\n" " \">>\"\n" " \"<\"\n" " \"|\"\n" "] @operator\n" "\n" "(\n" " (command (_) @constant)\n" " (#match\? @constant \"^-\")\n" ")\n" ""; static const char kHighlightsQuery_typescript[] = "; Variables\n" ";----------\n" "\n" "(identifier) @variable\n" "\n" "; Properties\n" ";-----------\n" "\n" "(property_identifier) @property\n" "\n" "; Function and method definitions\n" ";--------------------------------\n" "\n" "(function_expression\n" " name: (identifier) @function)\n" "(function_declaration\n" " name: (identifier) @function)\n" "(method_definition\n" " name: (property_identifier) @function.method)\n" "\n" "(pair\n" " key: (property_identifier) @function.method\n" " value: [(function_expression) (arrow_function)])\n" "\n" "(assignment_expression\n" " left: (member_expression\n" " property: (property_identifier) @function.method)\n" " right: [(function_expression) (arrow_function)])\n" "\n" "(variable_declarator\n" " name: (identifier) @function\n" " value: [(function_expression) (arrow_function)])\n" "\n" "(assignment_expression\n" " left: (identifier) @function\n" " right: [(function_expression) (arrow_function)])\n" "\n" "; Function and method calls\n" ";--------------------------\n" "\n" "(call_expression\n" " function: (identifier) @function)\n" "\n" "(call_expression\n" " function: (member_expression\n" " property: (property_identifier) @function.method))\n" "\n" "; Special identifiers\n" ";--------------------\n" "\n" "((identifier) @constructor\n" " (#match\? @constructor \"^[A-Z]\"))\n" "\n" "([\n" " (identifier)\n" " (shorthand_property_identifier)\n" " (shorthand_property_identifier_pattern)\n" " ] @constant\n" " (#match\? @constant \"^[A-Z_][A-Z\\\\d_]+$\"))\n" "\n" "((identifier) @variable.builtin\n" " (#match\? @variable.builtin \"^(arguments|module|console|window|document)$\")\n" " (#is-not\? local))\n" "\n" "((identifier) @function.builtin\n" " (#eq\? @function.builtin \"require\")\n" " (#is-not\? local))\n" "\n" "; Literals\n" ";---------\n" "\n" "(this) @variable.builtin\n" "(super) @variable.builtin\n" "\n" "[\n" " (true)\n" " (false)\n" " (null)\n" " (undefined)\n" "] @constant.builtin\n" "\n" "(comment) @comment\n" "\n" "[\n" " (string)\n" " (template_string)\n" "] @string\n" "\n" "(regex) @string.special\n" "(number) @number\n" "\n" "; Tokens\n" ";-------\n" "\n" "[\n" " \";\"\n" " (optional_chain)\n" " \".\"\n" " \",\"\n" "] @punctuation.delimiter\n" "\n" "[\n" " \"-\"\n" " \"--\"\n" " \"-=\"\n" " \"+\"\n" " \"++\"\n" " \"+=\"\n" " \"*\"\n" " \"*=\"\n" " \"**\"\n" " \"**=\"\n" " \"/\"\n" " \"/=\"\n" " \"%\"\n" " \"%=\"\n" " \"<\"\n" " \"<=\"\n" " \"<<\"\n" " \"<<=\"\n" " \"=\"\n" " \"==\"\n" " \"===\"\n" " \"!\"\n" " \"!=\"\n" " \"!==\"\n" " \"=>\"\n" " \">\"\n" " \">=\"\n" " \">>\"\n" " \">>=\"\n" " \">>>\"\n" " \">>>=\"\n" " \"~\"\n" " \"^\"\n" " \"&\"\n" " \"|\"\n" " \"^=\"\n" " \"&=\"\n" " \"|=\"\n" " \"&&\"\n" " \"||\"\n" " \"\?\?\"\n" " \"&&=\"\n" " \"||=\"\n" " \"\?\?=\"\n" "] @operator\n" "\n" "[\n" " \"(\"\n" " \")\"\n" " \"[\"\n" " \"]\"\n" " \"{\"\n" " \"}\"\n" "] @punctuation.bracket\n" "\n" "(template_substitution\n" " \"${\" @punctuation.special\n" " \"}\" @punctuation.special) @embedded\n" "\n" "[\n" " \"as\"\n" " \"async\"\n" " \"await\"\n" " \"break\"\n" " \"case\"\n" " \"catch\"\n" " \"class\"\n" " \"const\"\n" " \"continue\"\n" " \"debugger\"\n" " \"default\"\n" " \"delete\"\n" " \"do\"\n" " \"else\"\n" " \"export\"\n" " \"extends\"\n" " \"finally\"\n" " \"for\"\n" " \"from\"\n" " \"function\"\n" " \"get\"\n" " \"if\"\n" " \"import\"\n" " \"in\"\n" " \"instanceof\"\n" " \"let\"\n" " \"new\"\n" " \"of\"\n" " \"return\"\n" " \"set\"\n" " \"static\"\n" " \"switch\"\n" " \"target\"\n" " \"throw\"\n" " \"try\"\n" " \"typeof\"\n" " \"var\"\n" " \"void\"\n" " \"while\"\n" " \"with\"\n" " \"yield\"\n" "] @keyword\n" "\n" "\n" "; Types\n" "\n" "(type_identifier) @type\n" "(predefined_type) @type.builtin\n" "\n" "((identifier) @type\n" " (#match\? @type \"^[A-Z]\"))\n" "\n" "(type_arguments\n" " \"<\" @punctuation.bracket\n" " \">\" @punctuation.bracket)\n" "\n" "; Variables\n" "\n" "(required_parameter (identifier) @variable.parameter)\n" "(optional_parameter (identifier) @variable.parameter)\n" "\n" "; Keywords\n" "\n" "[ \"abstract\"\n" " \"declare\"\n" " \"enum\"\n" " \"export\"\n" " \"implements\"\n" " \"interface\"\n" " \"keyof\"\n" " \"namespace\"\n" " \"private\"\n" " \"protected\"\n" " \"public\"\n" " \"type\"\n" " \"readonly\"\n" " \"override\"\n" " \"satisfies\"\n" "] @keyword\n" ""; static const char kHighlightsQuery_tsx[] = "; Variables\n" ";----------\n" "\n" "(identifier) @variable\n" "\n" "; Properties\n" ";-----------\n" "\n" "(property_identifier) @property\n" "\n" "; Function and method definitions\n" ";--------------------------------\n" "\n" "(function_expression\n" " name: (identifier) @function)\n" "(function_declaration\n" " name: (identifier) @function)\n" "(method_definition\n" " name: (property_identifier) @function.method)\n" "\n" "(pair\n" " key: (property_identifier) @function.method\n" " value: [(function_expression) (arrow_function)])\n" "\n" "(assignment_expression\n" " left: (member_expression\n" " property: (property_identifier) @function.method)\n" " right: [(function_expression) (arrow_function)])\n" "\n" "(variable_declarator\n" " name: (identifier) @function\n" " value: [(function_expression) (arrow_function)])\n" "\n" "(assignment_expression\n" " left: (identifier) @function\n" " right: [(function_expression) (arrow_function)])\n" "\n" "; Function and method calls\n" ";--------------------------\n" "\n" "(call_expression\n" " function: (identifier) @function)\n" "\n" "(call_expression\n" " function: (member_expression\n" " property: (property_identifier) @function.method))\n" "\n" "; Special identifiers\n" ";--------------------\n" "\n" "((identifier) @constructor\n" " (#match\? @constructor \"^[A-Z]\"))\n" "\n" "([\n" " (identifier)\n" " (shorthand_property_identifier)\n" " (shorthand_property_identifier_pattern)\n" " ] @constant\n" " (#match\? @constant \"^[A-Z_][A-Z\\\\d_]+$\"))\n" "\n" "((identifier) @variable.builtin\n" " (#match\? @variable.builtin \"^(arguments|module|console|window|document)$\")\n" " (#is-not\? local))\n" "\n" "((identifier) @function.builtin\n" " (#eq\? @function.builtin \"require\")\n" " (#is-not\? local))\n" "\n" "; Literals\n" ";---------\n" "\n" "(this) @variable.builtin\n" "(super) @variable.builtin\n" "\n" "[\n" " (true)\n" " (false)\n" " (null)\n" " (undefined)\n" "] @constant.builtin\n" "\n" "(comment) @comment\n" "\n" "[\n" " (string)\n" " (template_string)\n" "] @string\n" "\n" "(regex) @string.special\n" "(number) @number\n" "\n" "; Tokens\n" ";-------\n" "\n" "[\n" " \";\"\n" " (optional_chain)\n" " \".\"\n" " \",\"\n" "] @punctuation.delimiter\n" "\n" "[\n" " \"-\"\n" " \"--\"\n" " \"-=\"\n" " \"+\"\n" " \"++\"\n" " \"+=\"\n" " \"*\"\n" " \"*=\"\n" " \"**\"\n" " \"**=\"\n" " \"/\"\n" " \"/=\"\n" " \"%\"\n" " \"%=\"\n" " \"<\"\n" " \"<=\"\n" " \"<<\"\n" " \"<<=\"\n" " \"=\"\n" " \"==\"\n" " \"===\"\n" " \"!\"\n" " \"!=\"\n" " \"!==\"\n" " \"=>\"\n" " \">\"\n" " \">=\"\n" " \">>\"\n" " \">>=\"\n" " \">>>\"\n" " \">>>=\"\n" " \"~\"\n" " \"^\"\n" " \"&\"\n" " \"|\"\n" " \"^=\"\n" " \"&=\"\n" " \"|=\"\n" " \"&&\"\n" " \"||\"\n" " \"\?\?\"\n" " \"&&=\"\n" " \"||=\"\n" " \"\?\?=\"\n" "] @operator\n" "\n" "[\n" " \"(\"\n" " \")\"\n" " \"[\"\n" " \"]\"\n" " \"{\"\n" " \"}\"\n" "] @punctuation.bracket\n" "\n" "(template_substitution\n" " \"${\" @punctuation.special\n" " \"}\" @punctuation.special) @embedded\n" "\n" "[\n" " \"as\"\n" " \"async\"\n" " \"await\"\n" " \"break\"\n" " \"case\"\n" " \"catch\"\n" " \"class\"\n" " \"const\"\n" " \"continue\"\n" " \"debugger\"\n" " \"default\"\n" " \"delete\"\n" " \"do\"\n" " \"else\"\n" " \"export\"\n" " \"extends\"\n" " \"finally\"\n" " \"for\"\n" " \"from\"\n" " \"function\"\n" " \"get\"\n" " \"if\"\n" " \"import\"\n" " \"in\"\n" " \"instanceof\"\n" " \"let\"\n" " \"new\"\n" " \"of\"\n" " \"return\"\n" " \"set\"\n" " \"static\"\n" " \"switch\"\n" " \"target\"\n" " \"throw\"\n" " \"try\"\n" " \"typeof\"\n" " \"var\"\n" " \"void\"\n" " \"while\"\n" " \"with\"\n" " \"yield\"\n" "] @keyword\n" "\n" "\n" "; Types\n" "\n" "(type_identifier) @type\n" "(predefined_type) @type.builtin\n" "\n" "((identifier) @type\n" " (#match\? @type \"^[A-Z]\"))\n" "\n" "(type_arguments\n" " \"<\" @punctuation.bracket\n" " \">\" @punctuation.bracket)\n" "\n" "; Variables\n" "\n" "(required_parameter (identifier) @variable.parameter)\n" "(optional_parameter (identifier) @variable.parameter)\n" "\n" "; Keywords\n" "\n" "[ \"abstract\"\n" " \"declare\"\n" " \"enum\"\n" " \"export\"\n" " \"implements\"\n" " \"interface\"\n" " \"keyof\"\n" " \"namespace\"\n" " \"private\"\n" " \"protected\"\n" " \"public\"\n" " \"type\"\n" " \"readonly\"\n" " \"override\"\n" " \"satisfies\"\n" "] @keyword\n" ""; } // namespace Markdown