nvim-treesitter/tests/query/highlights/php/variables.php

31 lines
688 B
PHP
Raw Permalink Normal View History

2024-03-18 21:19:50 -05:00
<?php
class A {
public function foo(self $a): self {
// ^ @variable.parameter
2024-03-18 21:19:50 -05:00
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
A::$foo::$bar;
// ^^^ @variable.member
// ^^^ @variable.member
2024-03-18 21:19:50 -05:00
}
}