Skip to content

Commit 98106b5

Browse files
committed
Fontify the pipe operator in the cc-mode independent php-mode
php-pipe-op and its rule arrived on master (#821) in the CC Mode based php-mode.el, which this branch renames to php-cc-mode.el; the new mode body needs the same rule for the same reason. Without it the comparison-operator matcher claims the `>' of `|>' and leaves the `|' plain.
1 parent bd187bb commit 98106b5

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

lisp/php-mode.el

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,11 @@ names are handled by the namespace matcher."
562562
;; Assignment operators (=, +=, ...)
563563
("\\([^=<!>]+?\\([\-+./%]?=\\)[^=<!]+?\\)" 2 'php-assignment-op)
564564

565+
;; Pipe operator (|>) --- PHP 8.5. Must precede the comparison
566+
;; operators, whose `[<>]=?' alternative would otherwise claim the
567+
;; `>' and leave the `|' unfontified.
568+
("\\(|>\\)" 1 'php-pipe-op)
569+
565570
;; Comparison operators (==, ===, >=, ...)
566571
("\\([!=]=\\{1,2\\}[>]?\\|[<>]=?\\)" 1 'php-comparison-op)
567572

0 commit comments

Comments
 (0)