1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-26 14:20:04 +08:00
SpaceVim/bundle/nvim-treesitter/tests/query/highlights/hack/generics.hack
2022-04-14 12:01:23 +08:00

25 lines
500 B
Plaintext
Vendored

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