From cc0bdabe5f9a9705bf2992831dd45e95d116fe0c Mon Sep 17 00:00:00 2001 From: Stephan Seitz Date: Tue, 23 Nov 2021 18:23:57 +0100 Subject: highlights(hack): extend queries add tests --- tests/query/highlights/hack/generics.hack | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/query/highlights/hack/generics.hack (limited to 'tests/query/highlights/hack/generics.hack') diff --git a/tests/query/highlights/hack/generics.hack b/tests/query/highlights/hack/generics.hack new file mode 100644 index 000000000..ea605420c --- /dev/null +++ b/tests/query/highlights/hack/generics.hack @@ -0,0 +1,23 @@ +class Box { + // ^ 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 + } +} -- cgit v1.2.3-70-g09d2