Constant tree_sitter_php::HIGHLIGHTS_QUERY

source ยท
pub const HIGHLIGHTS_QUERY: &str = "[\n  (php_tag)\n  \"?>\"\n] @tag\n\n; Keywords\n\n[\n  \"and\"\n  \"as\"\n  \"break\"\n  \"case\"\n  \"catch\"\n  \"class\"\n  \"clone\"\n  \"const\"\n  \"continue\"\n  \"declare\"\n  \"default\"\n  \"do\"\n  \"echo\"\n  \"else\"\n  \"elseif\"\n  \"enddeclare\"\n  \"endfor\"\n  \"endforeach\"\n  \"endif\"\n  \"endswitch\"\n  \"endwhile\"\n  \"enum\"\n  \"exit\"\n  \"extends\"\n  \"finally\"\n  \"fn\"\n  \"for\"\n  \"foreach\"\n  \"function\"\n  \"global\"\n  \"goto\"\n  \"if\"\n  \"implements\"\n  \"include\"\n  \"include_once\"\n  \"instanceof\"\n  \"insteadof\"\n  \"interface\"\n  \"match\"\n  \"namespace\"\n  \"new\"\n  \"or\"\n  \"print\"\n  \"require\"\n  \"require_once\"\n  \"return\"\n  \"switch\"\n  \"throw\"\n  \"trait\"\n  \"try\"\n  \"use\"\n  \"while\"\n  \"xor\"\n  \"yield\"\n  (abstract_modifier)\n  (final_modifier)\n  (readonly_modifier)\n  (static_modifier)\n  (visibility_modifier)\n] @keyword\n\n(yield_expression \"from\" @keyword)\n(function_static_declaration \"static\" @keyword)\n\n; Variables\n\n(relative_scope) @variable.builtin\n\n(variable_name) @variable\n\n(method_declaration name: (name) @constructor\n  (#eq? @constructor \"__construct\"))\n\n(object_creation_expression [\n  (name) @constructor\n  (qualified_name (name) @constructor)\n])\n\n((name) @constant\n (#match? @constant \"^_?[A-Z][A-Z\\\\d_]+$\"))\n((name) @constant.builtin\n (#match? @constant.builtin \"^__[A-Z][A-Z\\d_]+__$\"))\n(const_declaration (const_element (name) @constant))\n\n; Types\n\n(primitive_type) @type.builtin\n(cast_type) @type.builtin\n(named_type [\n  (name) @type\n  (qualified_name (name) @type)\n]) @type\n(named_type (name) @type.builtin\n  (#any-of? @type.builtin \"static\" \"self\"))\n\n; Functions\n\n(array_creation_expression \"array\" @function.builtin)\n(list_literal \"list\" @function.builtin)\n(exit_statement \"exit\" @function.builtin \"(\")\n\n(method_declaration\n  name: (name) @function.method)\n\n(function_call_expression\n  function: [(qualified_name (name)) (name)] @function)\n\n(scoped_call_expression\n  name: (name) @function)\n\n(member_call_expression\n  name: (name) @function.method)\n\n(function_definition\n  name: (name) @function)\n\n; Member\n\n(property_element\n  (variable_name) @property)\n\n(member_access_expression\n  name: (variable_name (name)) @property)\n(member_access_expression\n  name: (name) @property)\n\n; Basic tokens\n[\n  (string)\n  (string_content)\n  (encapsed_string)\n  (heredoc)\n  (heredoc_body)\n  (nowdoc_body)\n] @string\n(boolean) @constant.builtin\n(null) @constant.builtin\n(integer) @number\n(float) @number\n(comment) @comment\n\n((name) @variable.builtin\n (#eq? @variable.builtin \"this\"))\n\n\"$\" @operator\n";
Expand description

The syntax highlighting query for PHP.