[][src]Constant tree_sitter_javascript::HIGHLIGHT_QUERY

pub const HIGHLIGHT_QUERY: &'static str = "; Special identifiers\n;--------------------\n\n((identifier) @constant\n (#match? @constant \"^[A-Z_][A-Z\\\\d_]+$\"))\n\n((shorthand_property_identifier) @constant\n (#match? @constant \"^[A-Z_][A-Z\\\\d_]+$\"))\n\n((identifier) @constructor\n (#match? @constructor \"^[A-Z]\"))\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; Function and method definitions\n;--------------------------------\n\n(function\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) (arrow_function)])\n\n(assignment_expression\n  left: (member_expression\n    property: (property_identifier) @function.method)\n  right: [(function) (arrow_function)])\n\n(variable_declarator\n  name: (identifier) @function\n  value: [(function) (arrow_function)])\n\n(assignment_expression\n  left: (identifier) @function\n  right: [(function) (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; Variables\n;----------\n\n(formal_parameters\n  [\n    (identifier) @variable.parameter\n    (array_pattern\n      (identifier) @variable.parameter)\n    (object_pattern\n      [\n        (pair value: (identifier) @variable.parameter)\n        (shorthand_property_identifier) @variable.parameter\n      ])\n  ]\n)\n\n(identifier) @variable\n\n; Properties\n;-----------\n\n(property_identifier) @property\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(template_substitution\n  \"${\" @punctuation.special\n  \"}\" @punctuation.special) @embedded\n\n[\n  \";\"\n  \".\"\n  \",\"\n] @punctuation.delimiter\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[\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";

The syntax highlighting query for this language.