mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 11:36:54 -04:00
28 lines
595 B
PHP
28 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
|
||
|
|
}
|
||
|
|
}
|