mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 19:30:02 -04:00
fix(php): parameter and operator touch-ups
This commit is contained in:
parent
876111c8df
commit
28a914eb57
3 changed files with 11 additions and 7 deletions
|
|
@ -317,10 +317,12 @@
|
||||||
])
|
])
|
||||||
|
|
||||||
; Parameters
|
; Parameters
|
||||||
[
|
(variadic_parameter
|
||||||
(simple_parameter)
|
"..." @operator
|
||||||
(variadic_parameter)
|
name: (variable_name) @variable.parameter)
|
||||||
] @variable.parameter
|
|
||||||
|
(simple_parameter
|
||||||
|
name: (variable_name) @variable.parameter)
|
||||||
|
|
||||||
(argument
|
(argument
|
||||||
(name) @variable.parameter)
|
(name) @variable.parameter)
|
||||||
|
|
@ -362,7 +364,9 @@
|
||||||
(attribute_list) @attribute
|
(attribute_list) @attribute
|
||||||
|
|
||||||
; Conditions ( ? : )
|
; Conditions ( ? : )
|
||||||
(conditional_expression) @keyword.conditional
|
(conditional_expression
|
||||||
|
"?" @keyword.conditional.ternary
|
||||||
|
":" @keyword.conditional.ternary)
|
||||||
|
|
||||||
; Directives
|
; Directives
|
||||||
(declare_directive
|
(declare_directive
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
function b(int $a, string $b): Foo\Dog {}
|
function b(int $a, string $b): Foo\Dog {}
|
||||||
// ^^^ @type.builtin
|
// ^^^ @type.builtin
|
||||||
// ^^ @variable
|
// ^^ @variable.parameter
|
||||||
// ^^^^^^ @type.builtin
|
// ^^^^^^ @type.builtin
|
||||||
// ^^^ @module
|
// ^^^ @module
|
||||||
// ^^^ @type
|
// ^^^ @type
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
class A {
|
class A {
|
||||||
public function foo(self $a): self {
|
public function foo(self $a): self {
|
||||||
// ^ @variable
|
// ^ @variable.parameter
|
||||||
new self();
|
new self();
|
||||||
// ^^^^ @constructor
|
// ^^^^ @constructor
|
||||||
new static();
|
new static();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue