feat(php): add highlight tests

This commit is contained in:
Caleb White 2024-03-18 21:19:50 -05:00 committed by Christian Clason
parent 68ba579eb6
commit 3400788705
5 changed files with 251 additions and 0 deletions

View 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
}
}