We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b5876da commit bc87d0aCopy full SHA for bc87d0a
lib/rouge/lexers/php.rb
@@ -280,6 +280,9 @@ def builtins
280
end
281
282
state :in_const do
283
+ rule %r/(\??#{id})(\s+)(#{id})/i do
284
+ groups Keyword::Type, Text, Name::Constant
285
+ end
286
rule id, Name::Constant
287
rule %r/=/, Operator, :in_assign
288
mixin :escape
spec/visual/samples/php
@@ -190,6 +190,12 @@ class C {
190
public static ?string $a = "";
191
public static int $b = 0;
192
193
+ const bool CONST_1 = true;
194
+ public const int CONST_2 = 1;
195
+ protected const float CONST_3 = 1.0;
196
+ private const string CONST_4 = "foo";
197
+ const ?array CONST_5 = [];
198
+
199
public function __construct(
200
public $foo,
201
protected readonly $bar,
0 commit comments