1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-27 12:10:06 +08:00
SpaceVim/bundle/nvim-treesitter/tests/query/highlights/hack/generics.hack

25 lines
500 B
Plaintext
Raw Normal View History

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