nvim-treesitter/tests/query/highlights/php/variables.php
2024-03-27 08:29:44 +01:00

27 lines
595 B
PHP

<?php
class A {
public function foo(self $a): self {
// ^ @variable
new self();
// ^^^^ @constructor
new static();
// ^^^^^^ @constructor
new parent();
// ^^^^^^ @constructor
$this->foo();
// ^^^^ @variable.builtin
// ^^^ @function.method.call
self::foo();
// ^^^^ @variable.builtin
// ^^^ @function.call
static::foo();
// ^^^^^^ @variable.builtin
parent::foo();
// ^^^^^^ @variable.builtin
$this->foo;
// ^^^ @variable.member
$this->foo(a: 5);
// ^ @variable.parameter
}
}