diff options
| author | Caleb White <cdwhite3@pm.me> | 2024-03-18 21:19:50 -0500 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2024-03-27 08:29:44 +0100 |
| commit | 34007887059238f63a49ab4d382d839d9405c66c (patch) | |
| tree | a5d7b7aa35fa3a8dda72194023eec2e587d13c74 /tests/query/highlights/php/variables.php | |
| parent | bot(lockfile): update djot, hlsplaylist, html, meson, muttrc, query, svelte, ... (diff) | |
| download | nvim-treesitter-34007887059238f63a49ab4d382d839d9405c66c.tar nvim-treesitter-34007887059238f63a49ab4d382d839d9405c66c.tar.gz nvim-treesitter-34007887059238f63a49ab4d382d839d9405c66c.tar.bz2 nvim-treesitter-34007887059238f63a49ab4d382d839d9405c66c.tar.lz nvim-treesitter-34007887059238f63a49ab4d382d839d9405c66c.tar.xz nvim-treesitter-34007887059238f63a49ab4d382d839d9405c66c.tar.zst nvim-treesitter-34007887059238f63a49ab4d382d839d9405c66c.zip | |
feat(php): add highlight tests
Diffstat (limited to 'tests/query/highlights/php/variables.php')
| -rw-r--r-- | tests/query/highlights/php/variables.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/query/highlights/php/variables.php b/tests/query/highlights/php/variables.php new file mode 100644 index 000000000..6a466357c --- /dev/null +++ b/tests/query/highlights/php/variables.php @@ -0,0 +1,28 @@ +<?php + +class A { + public function foo(self $a): self { +// ^ @variable + new self(); +// ^^^^ @constructor + new static(); +// ^^^^^^ @constructor + new parent(); +// ^^^^^^ @constructor + $this->foo(); +// ^^^^ @variable.builtin +// ^^ @operator +// ^^^ @function.method.call + self::foo(); +// ^^^^ @variable.builtin +// ^^^ @function.call + static::foo(); +// ^^^^^^ @variable.builtin + parent::foo(); +// ^^^^^^ @variable.builtin + $this->foo; +// ^^^ @variable.member + $this->foo(a: 5); +// ^ @variable.parameter + } +} |
