diff options
Diffstat (limited to 'tests/query/highlights/php/keywords.php')
| -rw-r--r-- | tests/query/highlights/php/keywords.php | 122 |
1 files changed, 0 insertions, 122 deletions
diff --git a/tests/query/highlights/php/keywords.php b/tests/query/highlights/php/keywords.php index 4bacf1c9d..f3d3f95a7 100644 --- a/tests/query/highlights/php/keywords.php +++ b/tests/query/highlights/php/keywords.php @@ -1,101 +1,28 @@ <?php -//^^^ @punctuation.bracket - -declare(strict_types=1); -//^^^^^ @keyword -// ^^^^^^^^^^^^ @variable.parameter -// ^ @operator -// ^ @number -// ^ @punctuation.delimiter - -include "file.php"; -//^^^^^ @keyword.import -// ^^^^^^^^^ @string -include_once "file.php"; -//^^^^^^^^^^ @keyword.import -require "file.php"; -//^^^^^ @keyword.import -require_once "file.php"; -//^^^^^^^^^^ @keyword.import - -namespace A\B; -//^^^^^^^ @keyword -// ^^^ @module - -if ($a and $b or $c xor $d) {} elseif ($b) {} else {} -// <- @keyword.conditional -// ^^^ @keyword.operator -// ^^ @keyword.operator -// ^^^ @keyword.operator -// ^^^^^^ @keyword.conditional -// ^^^^ @keyword.conditional - -for ($i = 0; $i < 1; $i++) { continue; } -// <- @keyword.repeat -// ^ @operator -// ^^ @operator -// ^^^^^^^^ @keyword.repeat - -while ($b) {} -//^^^ @keyword.repeat - -do { } while ($c); -// <- @keyword.repeat -// ^^^^^ @keyword.repeat - -foreach ($foos as $foo) {} -//^^^^^ @keyword.repeat -// ^^ @keyword.operator - -try {} catch (Exception $e) {} finally {} -//^ @keyword.exception -// ^^^^^ @keyword.exception -// ^^^^^^^^^ @type -// ^^^^^^^ @keyword.exception - -function a() {} -//^^^^^^ @keyword.function -// ^ @function abstract class A -//^^^^^^ @keyword.modifier -// ^^^^^ @keyword -// ^ @type { - private const BAR = 1; -//^^^^^^^ @keyword.modifier -// ^^^^^ @keyword.modifier - // ^^^ @constant protected readonly static $a; //^^^^^^^^^ @keyword.modifier // ^^^^^^^^ @keyword.modifier // ^^^^^^ @keyword.modifier - // ^^ @property - final public $b; -//^^^^^ @keyword.modifier public static function foo(): static {} //^^^^^^ @keyword.modifier // ^^^^^^ @keyword.modifier // ^^^^^^^^ @keyword.function // ^^^ @function.method // ^^^^^^ @type.builtin - public function __construct() {} -// ^^^^^^^^^^^ @constructor } class B extends A implements T // ^ @type // ^^^^^^^ @keyword -// ^ @type // ^^^^^^^^^^ @keyword -// ^ @type { use T, U { //^^^ @keyword.import -// ^ @punctuation.delimiter U::small insteadof T; // ^ @type -// ^^ @operator // ^^^^^ @function.method // ^^^^^^^^^ @keyword // ^ @type @@ -115,44 +42,12 @@ class B extends A implements T // ^^^^^^^^ @type.builtin // ^^^^ @type.builtin { - $call instanceof Closure; -// ^^^^^ @variable -// ^^^^^^^^^^ @keyword.operator -// ^^^^^^^ @type - fn ($a, $b) => $a + $b; -// ^^ @keyword.function static $a; // ^^^^^^ @keyword.modifier - global $a; -// ^^^^^^ @keyword - clone $call; -// ^^^^^ @keyword - match ($a) { -// ^^^^^ @keyword.conditional - default => "other", -// ^^^^^^^ @keyword -// ^^ @operator - }; - - switch ($a) { -// ^^^^^^ @keyword.conditional - case 'value': -// ^^^^ @keyword.conditional - break; -// ^^^^^ @keyword - default: -// ^^^^^^^ @keyword - } yield $a; // ^^^^^ @keyword.return yield from $a; // ^^^^ @keyword.return - return $a; -// ^^^^^^ @keyword.return - goto a; -// ^^^^ @keyword - echo "a"; -// ^^^^ @keyword print "a"; // ^^^^^ @keyword print("a"); @@ -165,20 +60,3 @@ class B extends A implements T // ^^^^ @function.builtin } } - -throw new Exception("oh"); -//^^^ @keyword.exception -// ^^^ @keyword -// ^^^^^^^^^ @constructor - -interface T {} -//^^^^^^^ @keyword -// ^ @type - -trait T { public function small(): void {} } -//^^^ @keyword -// ^ @type -// ^^^^ @type.builtin -enum Foo { case Bar; } -//^^ @keyword -// ^^^^ @keyword.conditional |
