@@ -1543,11 +1543,14 @@ a completion list."
1543
1543
(" \\ (->\\ )\\ (\\ sw+\\ )\\ s-*(" (1 'php-object-op ) (2 'php-method-call ))
1544
1544
(" \\ <\\ (const\\ )\\ s-+\\ (\\ _<.+?\\ _>\\ )" (1 'php-keyword ) (2 'php-constant-assign ))
1545
1545
1546
+ ; ; Logical operator (!)
1547
+ (" \\ (![^=]\\ )" 1 'php-logical-op )
1548
+
1546
1549
; ; Highlight special variables
1547
1550
(" \\ (\\ $\\ )\\ (this\\ )\\ >" (1 'php-$this-sigil ) (2 'php-$this ))
1548
1551
(" \\ (\\ $+\\ )\\ (\\ sw+\\ )" (1 'php-variable-sigil ) (2 'php-variable-name ))
1549
1552
(" \\ (->\\ )\\ ([a-zA-Z0-9_]+\\ )" (1 'php-object-op ) (2 'php-property-name ))
1550
-
1553
+
1551
1554
; ; Highlight function/method names
1552
1555
(" \\ <function\\ s-+&?\\ (\\ (?:\\ sw\\ |\\ s_\\ )+\\ )\\ s-*(" 1 'php-function-name )
1553
1556
@@ -1622,7 +1625,7 @@ a completion list."
1622
1625
1623
1626
; ; Highlight class name after "use .. as"
1624
1627
(" \\ <as\\ s-+\\ (\\ sw+\\ )" 1 font-lock-type-face )
1625
-
1628
+
1626
1629
; ; Class names are highlighted by cc-mode as defined in
1627
1630
; ; c-class-decl-kwds, below regexp is a workaround for a bug
1628
1631
; ; where the class names are not highlighted right after opening
@@ -1651,6 +1654,23 @@ a completion list."
1651
1654
(" \\ ?\\ (\\ (:?\\ sw\\ |\\ s_\\ )+\\ )\\ s-+\\ $" 1 font-lock-type-face )
1652
1655
(" function.+:\\ s-*\\ ??\\ (\\ (?:\\ sw\\ |\\ s_\\ )+\\ )" 1 font-lock-type-face )
1653
1656
(" )\\ s-*:\\ s-*\\ ??\\ (\\ (?:\\ sw\\ |\\ s_\\ )+\\ )\\ s-*\\ (?:\{ \\ |;\\ )" 1 font-lock-type-face )
1657
+
1658
+ ; ; Assignment operators (=, +=, ...)
1659
+ (" \\ ([^=<!>]+?\\ ([\- +./%]?=\\ )[^=<!>]+?\\ )" 2 'php-assignment-op )
1660
+
1661
+ ; ; Comparison operators (==, ===, >=, ...)
1662
+ (" \\ ([!=]=\\ {1,2\\ }[>]?\\ |[<>]=?\\ )" 1 'php-comparison-op )
1663
+
1664
+ ; ; Arithmetic operators (+, -, *, **, /, %)
1665
+ (" \\ (?:[A-Za-z0-9[:blank:]]\\ )\\ ([\- +*/%]\\ *?\\ )\\ (?:[A-Za-z0-9[:blank:]]\\ )" 1 'php-arithmetic-op )
1666
+
1667
+ ; ; Increment and Decrement operators (++, --)
1668
+ (" \\ (\-\- \\ |\+\+ \\ )\$ \\ w+" 1 'php-inc-dec-op ) ; ; pre inc/dec
1669
+ (" \$ \\ w+\\ (\-\- \\ |\+\+ \\ )" 1 'php-inc-dec-op ) ; ; post inc/dec
1670
+
1671
+ ; ; Logical operators (and, or, &&, ...)
1672
+ ; ; Not operator (!) is defined in "before cc-mode" section above.
1673
+ (" \\ (&&\\ |\|\| \\ )" 1 'php-logical-op )
1654
1674
))
1655
1675
" Detailed highlighting for PHP Mode." )
1656
1676
0 commit comments