1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-04 06:50:04 +08:00
SpaceVim/bundle/nvim-treesitter-0.9.1/tests/query/highlights/hack/generics.hack

25 lines
521 B
Plaintext
Raw Normal View History

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