nvim-treesitter/tests/query/highlights/hack/generics.hack
2024-01-19 16:58:37 +01:00

24 lines
534 B
Text

class Box<T> {
// ^ @type
// ^ @type
protected T $data;
// ^ @type.qualifier
// ^ @type
public function __construct(T $data) {
// ^ @type
// ^ @parameter
// ^ @keyword.function
// ^ @type.qualifier
// ^ @method
$this->data = $data;
}
public function getData(): T {
// ^ @method
// ^ @type.qualifier
return $this->data;
// ^ @operator
// ^ @variable.builtin
}
}