mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 11:20:07 -04:00
fix(php): add missing keyword highlights, fix static keyword
This commit is contained in:
parent
3400788705
commit
1c9a94bd60
1 changed files with 15 additions and 2 deletions
|
|
@ -26,6 +26,9 @@
|
||||||
(name) @type)
|
(name) @type)
|
||||||
])
|
])
|
||||||
|
|
||||||
|
(named_type (name) @type.builtin
|
||||||
|
(#any-of? @type.builtin "static" "self"))
|
||||||
|
|
||||||
(class_declaration
|
(class_declaration
|
||||||
name: (name) @type)
|
name: (name) @type)
|
||||||
|
|
||||||
|
|
@ -96,6 +99,8 @@
|
||||||
(list_literal
|
(list_literal
|
||||||
"list" @function.builtin)
|
"list" @function.builtin)
|
||||||
|
|
||||||
|
(exit_statement "exit" @function.builtin "(")
|
||||||
|
|
||||||
(method_declaration
|
(method_declaration
|
||||||
name: (name) @function.method)
|
name: (name) @function.method)
|
||||||
|
|
||||||
|
|
@ -216,7 +221,6 @@
|
||||||
|
|
||||||
(named_label_statement) @label
|
(named_label_statement) @label
|
||||||
|
|
||||||
|
|
||||||
; Keywords
|
; Keywords
|
||||||
[
|
[
|
||||||
"and"
|
"and"
|
||||||
|
|
@ -246,6 +250,7 @@
|
||||||
"implements"
|
"implements"
|
||||||
"insteadof"
|
"insteadof"
|
||||||
"interface"
|
"interface"
|
||||||
|
"print"
|
||||||
"namespace"
|
"namespace"
|
||||||
"new"
|
"new"
|
||||||
"trait"
|
"trait"
|
||||||
|
|
@ -260,14 +265,22 @@
|
||||||
"protected"
|
"protected"
|
||||||
"public"
|
"public"
|
||||||
"readonly"
|
"readonly"
|
||||||
"static"
|
(static_modifier)
|
||||||
] @keyword.modifier
|
] @keyword.modifier
|
||||||
|
|
||||||
|
(function_static_declaration
|
||||||
|
"static" @keyword.modifier)
|
||||||
|
|
||||||
[
|
[
|
||||||
"return"
|
"return"
|
||||||
|
"exit"
|
||||||
"yield"
|
"yield"
|
||||||
] @keyword.return
|
] @keyword.return
|
||||||
|
|
||||||
|
(yield_expression
|
||||||
|
"from" @keyword.return)
|
||||||
|
|
||||||
|
|
||||||
[
|
[
|
||||||
"case"
|
"case"
|
||||||
"else"
|
"else"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue