mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-06 21:40:03 -04:00
highlights(hack): extend queries add tests
This commit is contained in:
parent
77c006eb08
commit
cc0bdabe5f
10 changed files with 280 additions and 5 deletions
23
tests/query/highlights/hack/generics.hack
Normal file
23
tests/query/highlights/hack/generics.hack
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
class Box<T> {
|
||||
// ^ type
|
||||
// ^ type
|
||||
protected T $data;
|
||||
// ^ keyword
|
||||
// ^ type
|
||||
|
||||
public function __construct(T $data) {
|
||||
// ^ type
|
||||
// ^ parameter
|
||||
// ^ keyword
|
||||
// ^ method
|
||||
$this->data = $data;
|
||||
}
|
||||
|
||||
public function getData(): T {
|
||||
// ^ method
|
||||
// ^ keyword
|
||||
return $this->data;
|
||||
// ^ operator
|
||||
// ^ variable.builtin
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue