mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-08 22:40:12 -04:00
feat(php): add highlight tests
This commit is contained in:
parent
68ba579eb6
commit
3400788705
5 changed files with 251 additions and 0 deletions
28
tests/query/highlights/php/variables.php
Normal file
28
tests/query/highlights/php/variables.php
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
class A {
|
||||
public function foo(self $a): self {
|
||||
// ^ @variable
|
||||
new self();
|
||||
// ^^^^ @constructor
|
||||
new static();
|
||||
// ^^^^^^ @constructor
|
||||
new parent();
|
||||
// ^^^^^^ @constructor
|
||||
$this->foo();
|
||||
// ^^^^ @variable.builtin
|
||||
// ^^ @operator
|
||||
// ^^^ @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
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue