Constant tree_sitter_javascript::HIGHLIGHT_QUERY

source ยท
pub const HIGHLIGHT_QUERY: &str = "; 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(glimmer_opening_tag) @tag.builtin\n(glimmer_closing_tag) @tag.builtin\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";
Expand description

The syntax highlighting query for this language.