Skip to content

Commit

Permalink
instanceof keyword and class highlight
Browse files Browse the repository at this point in the history
  • Loading branch information
craynot committed May 26, 2024
1 parent 523bd05 commit 474e318
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
7 changes: 5 additions & 2 deletions php-ts-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
"elseif" "enddeclare" "endforeach" "endif" "endswitch"
"endwhile" "enum" "extends" "final" "finally" "for" "foreach"
"fn" "function" "global" "if" "implements" "include_once"
"include" "insteadof" "interface" "match" "namespace" "new"
"include" "instanceof" "insteadof" "interface" "match" "namespace" "new"
"private" "protected" "public" "readonly" "require_once" "require"
"return" "static" "switch" "throw" "trait" "try" "use"
"while" "yield")
Expand Down Expand Up @@ -172,7 +172,10 @@ see https://www.php.net/manual/language.constants.predefined.php")
@php-constant
[(integer)
(float)]
@font-lock-number-face)
@font-lock-number-face
(binary_expression
operator: "instanceof"
right: [(name) (qualified_name)] @php-class))

:language 'php
:feature 'definition
Expand Down
10 changes: 10 additions & 0 deletions tests/php-ts-mode-resources/face.erts
Original file line number Diff line number Diff line change
Expand Up @@ -212,3 +212,13 @@ class Test {}
=-=
php-class
=-=-=

Name: Instanceof class
No-After-Newline: t

=-=
<?php
$a instanceof |B;
=-=
php-class
=-=-=

0 comments on commit 474e318

Please sign in to comment.