Fix php hightlight (#3317)

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
imgbot
Erasin 2 years ago committed by GitHub
parent 3121353c6a
commit bf6f7042fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -8,6 +8,14 @@
(named_type (name) @type) @type (named_type (name) @type) @type
(named_type (qualified_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 ; Functions
(array_creation_expression "array" @function.builtin) (array_creation_expression "array" @function.builtin)
@ -17,7 +25,7 @@
name: (name) @function.method) name: (name) @function.method)
(function_call_expression (function_call_expression
function: (qualified_name (name)) @function) function: (_) @function)
(scoped_call_expression (scoped_call_expression
name: (name) @function) name: (name) @function)
@ -28,6 +36,7 @@
(function_definition (function_definition
name: (name) @function) name: (name) @function)
; Member ; Member
(property_element (property_element
@ -67,52 +76,54 @@
; Keywords ; Keywords
"abstract" @keyword [
"as" @keyword "abstract"
"break" @keyword "as"
"case" @keyword "break"
"catch" @keyword "case"
"class" @keyword "catch"
"const" @keyword "class"
"continue" @keyword "const"
"declare" @keyword "continue"
"default" @keyword "declare"
"do" @keyword "default"
"echo" @keyword "do"
"else" @keyword "echo"
"elseif" @keyword "else"
"enddeclare" @keyword "elseif"
"endforeach" @keyword "enddeclare"
"endif" @keyword "endforeach"
"endswitch" @keyword "endif"
"endwhile" @keyword "endswitch"
"enum" @keyword "endwhile"
"extends" @keyword "enum"
"final" @keyword "extends"
"finally" @keyword "final"
"foreach" @keyword "finally"
"fn" @keyword "foreach"
"function" @keyword "fn"
"global" @keyword "function"
"if" @keyword "global"
"implements" @keyword "if"
"include_once" @keyword "implements"
"include" @keyword "include_once"
"insteadof" @keyword "include"
"interface" @keyword "insteadof"
"match" @keyword "interface"
"namespace" @keyword "match"
"new" @keyword "namespace"
"private" @keyword "new"
"protected" @keyword "private"
"public" @keyword "protected"
"require_once" @keyword "public"
"require" @keyword "require_once"
"return" @keyword "require"
"static" @keyword "return"
"switch" @keyword "static"
"throw" @keyword "switch"
"trait" @keyword "throw"
"try" @keyword "trait"
"use" @keyword "try"
"while" @keyword "use"
"while"
] @keyword

Loading…
Cancel
Save