Skip to content

Commit 27ae09e

Browse files
committed
instanceof keyword and class highlight
1 parent 975f556 commit 27ae09e

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

php-ts-mode.el

+5-2
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
"elseif" "enddeclare" "endforeach" "endif" "endswitch"
101101
"endwhile" "enum" "extends" "final" "finally" "for" "foreach"
102102
"fn" "function" "global" "if" "implements" "include_once"
103-
"include" "insteadof" "interface" "match" "namespace" "new"
103+
"include" "instanceof" "insteadof" "interface" "match" "namespace" "new"
104104
"private" "protected" "public" "readonly" "require_once" "require"
105105
"return" "static" "switch" "throw" "trait" "try" "use"
106106
"while" "yield")
@@ -172,7 +172,10 @@ see https://www.php.net/manual/language.constants.predefined.php")
172172
@php-constant
173173
[(integer)
174174
(float)]
175-
@font-lock-number-face)
175+
@font-lock-number-face
176+
(binary_expression
177+
operator: "instanceof"
178+
right: [(name) (qualified_name)] @php-class))
176179

177180
:language 'php
178181
:feature 'definition

tests/php-ts-mode-resources/face.erts

+10
Original file line numberDiff line numberDiff line change
@@ -212,3 +212,13 @@ class Test {}
212212
=-=
213213
php-class
214214
=-=-=
215+
216+
Name: Instanceof class
217+
No-After-Newline: t
218+
219+
=-=
220+
<?php
221+
$a instanceof |B;
222+
=-=
223+
php-class
224+
=-=-=

0 commit comments

Comments
 (0)