diff options
author | Erasin | 2022-08-05 12:34:03 +0000 |
---|---|---|
committer | GitHub | 2022-08-05 12:34:03 +0000 |
commit | bf6f7042fef31ec5f16a2aa1a048d9475b8b2f76 (patch) | |
tree | d254a695304b7a55efa2609c7fb0c36011461ea8 /runtime/queries | |
parent | 3121353c6ab2fbc5fced28f075c7fc45b53b661e (diff) |
Fix php hightlight (#3317)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
Diffstat (limited to 'runtime/queries')
-rw-r--r-- | runtime/queries/php/highlights.scm | 111 |
1 files changed, 61 insertions, 50 deletions
diff --git a/runtime/queries/php/highlights.scm b/runtime/queries/php/highlights.scm index 5379fa1e..77c9424f 100644 --- a/runtime/queries/php/highlights.scm +++ b/runtime/queries/php/highlights.scm @@ -8,6 +8,14 @@ (named_type (name) @type) @type (named_type (qualified_name) @type) @type +(namespace_definition + name: (namespace_name (name) @namespace)) + +; Superglobals +(subscript_expression + (variable_name(name) @constant.builtin + (#match? @constant.builtin "^_?[A-Z][A-Z\\d_]+$"))) + ; Functions (array_creation_expression "array" @function.builtin) @@ -17,7 +25,7 @@ name: (name) @function.method) (function_call_expression - function: (qualified_name (name)) @function) + function: (_) @function) (scoped_call_expression name: (name) @function) @@ -28,6 +36,7 @@ (function_definition name: (name) @function) + ; Member (property_element @@ -67,52 +76,54 @@ ; Keywords -"abstract" @keyword -"as" @keyword -"break" @keyword -"case" @keyword -"catch" @keyword -"class" @keyword -"const" @keyword -"continue" @keyword -"declare" @keyword -"default" @keyword -"do" @keyword -"echo" @keyword -"else" @keyword -"elseif" @keyword -"enddeclare" @keyword -"endforeach" @keyword -"endif" @keyword -"endswitch" @keyword -"endwhile" @keyword -"enum" @keyword -"extends" @keyword -"final" @keyword -"finally" @keyword -"foreach" @keyword -"fn" @keyword -"function" @keyword -"global" @keyword -"if" @keyword -"implements" @keyword -"include_once" @keyword -"include" @keyword -"insteadof" @keyword -"interface" @keyword -"match" @keyword -"namespace" @keyword -"new" @keyword -"private" @keyword -"protected" @keyword -"public" @keyword -"require_once" @keyword -"require" @keyword -"return" @keyword -"static" @keyword -"switch" @keyword -"throw" @keyword -"trait" @keyword -"try" @keyword -"use" @keyword -"while" @keyword +[ + "abstract" + "as" + "break" + "case" + "catch" + "class" + "const" + "continue" + "declare" + "default" + "do" + "echo" + "else" + "elseif" + "enddeclare" + "endforeach" + "endif" + "endswitch" + "endwhile" + "enum" + "extends" + "final" + "finally" + "foreach" + "fn" + "function" + "global" + "if" + "implements" + "include_once" + "include" + "insteadof" + "interface" + "match" + "namespace" + "new" + "private" + "protected" + "public" + "require_once" + "require" + "return" + "static" + "switch" + "throw" + "trait" + "try" + "use" + "while" +] @keyword |