fix(php): parameter and operator touch-ups

This commit is contained in:
Riley Bruins 2024-04-23 10:52:01 -07:00 committed by Christian Clason
parent 876111c8df
commit 28a914eb57
3 changed files with 11 additions and 7 deletions

View file

@ -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

View file

@ -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

View file

@ -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();