mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-11 16:00:02 -04:00
fix(php): fix use_{as,instead_of}_clause highlights
This commit is contained in:
parent
1c9a94bd60
commit
7d938c1c72
2 changed files with 31 additions and 6 deletions
|
|
@ -26,7 +26,8 @@
|
|||
(name) @type)
|
||||
])
|
||||
|
||||
(named_type (name) @type.builtin
|
||||
(named_type
|
||||
(name) @type.builtin
|
||||
(#any-of? @type.builtin "static" "self"))
|
||||
|
||||
(class_declaration
|
||||
|
|
@ -99,7 +100,9 @@
|
|||
(list_literal
|
||||
"list" @function.builtin)
|
||||
|
||||
(exit_statement "exit" @function.builtin "(")
|
||||
(exit_statement
|
||||
"exit" @function.builtin
|
||||
"(")
|
||||
|
||||
(method_declaration
|
||||
name: (name) @function.method)
|
||||
|
|
@ -123,6 +126,18 @@
|
|||
(nullsafe_member_call_expression
|
||||
name: (name) @function.method)
|
||||
|
||||
(use_instead_of_clause
|
||||
(class_constant_access_expression
|
||||
(_)
|
||||
(name) @function.method)
|
||||
(name) @type)
|
||||
|
||||
(use_as_clause
|
||||
(class_constant_access_expression
|
||||
(_)
|
||||
(name) @function.method)*
|
||||
(name) @function.method)
|
||||
|
||||
(method_declaration
|
||||
name: (name) @constructor
|
||||
(#eq? @constructor "__construct"))
|
||||
|
|
@ -280,7 +295,6 @@
|
|||
(yield_expression
|
||||
"from" @keyword.return)
|
||||
|
||||
|
||||
[
|
||||
"case"
|
||||
"else"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue