From 081a99b3bed1f5050610d08870c71409b878c3c3 Mon Sep 17 00:00:00 2001 From: Caleb White Date: Wed, 26 Feb 2025 08:36:24 -0600 Subject: feat(php): add support for new relative_name node --- tests/query/highlights/php/keywords.php | 27 ------ tests/query/highlights/php/namespaces.php | 147 ++++++++++++++++++++++++++++++ 2 files changed, 147 insertions(+), 27 deletions(-) create mode 100644 tests/query/highlights/php/namespaces.php (limited to 'tests/query') diff --git a/tests/query/highlights/php/keywords.php b/tests/query/highlights/php/keywords.php index 5504cab19..21d248e69 100644 --- a/tests/query/highlights/php/keywords.php +++ b/tests/query/highlights/php/keywords.php @@ -2,49 +2,22 @@ namespace Foo\Bar; //^^^^^^^ @keyword.type -// ^^^ @module -// ^^^ @module use Foo\Baz as Baaz; //^ @keyword.import -// ^^^ @module -// ^^^ @type // ^^ @keyword.operator -// ^^^^ @type.definition - -use Foo\Baz\{Foo, Bar}; -// ^^^ @type -// ^^^ @type use function Foo\foo as fooo; // ^^^^^^^^ @keyword.function -// ^^^ @function -// ^^^^ @function - -use function Foo\{bar, baz}; -// ^^^ @function -// ^^^ @function use const Foo\FOO as FOOO; // ^^^^^ @keyword.modifier -// ^^^ @constant -// ^^^^ @constant - -use const Foo\{FOO, BAR}; -// ^^^ @constant -// ^^^ @constant use Foo\Baz\{ -// ^^^ @module -// ^^^ @module - Bar, -//^^^ @type function foo, //^^^^^^^^ @keyword.function -// ^^^ @function const FOO, //^^^^^ @keyword.modifier -// ^^^ @constant }; abstract class A diff --git a/tests/query/highlights/php/namespaces.php b/tests/query/highlights/php/namespaces.php new file mode 100644 index 000000000..1c96a95b2 --- /dev/null +++ b/tests/query/highlights/php/namespaces.php @@ -0,0 +1,147 @@ +