@@ -1543,11 +1543,14 @@ a completion list."
15431543 (" \\ (->\\ )\\ (\\ sw+\\ )\\ s-*(" (1 'php-object-op ) (2 'php-method-call ))
15441544 (" \\ <\\ (const\\ )\\ s-+\\ (\\ _<.+?\\ _>\\ )" (1 'php-keyword ) (2 'php-constant-assign ))
15451545
1546+ ; ; Logical operator (!)
1547+ (" \\ (![^=]\\ )" 1 'php-logical-op )
1548+
15461549 ; ; Highlight special variables
15471550 (" \\ (\\ $\\ )\\ (this\\ )\\ >" (1 'php-$this-sigil ) (2 'php-$this ))
15481551 (" \\ (\\ $+\\ )\\ (\\ sw+\\ )" (1 'php-variable-sigil ) (2 'php-variable-name ))
15491552 (" \\ (->\\ )\\ ([a-zA-Z0-9_]+\\ )" (1 'php-object-op ) (2 'php-property-name ))
1550-
1553+
15511554 ; ; Highlight function/method names
15521555 (" \\ <function\\ s-+&?\\ (\\ (?:\\ sw\\ |\\ s_\\ )+\\ )\\ s-*(" 1 'php-function-name )
15531556
@@ -1622,7 +1625,7 @@ a completion list."
16221625
16231626 ; ; Highlight class name after "use .. as"
16241627 (" \\ <as\\ s-+\\ (\\ sw+\\ )" 1 font-lock-type-face )
1625-
1628+
16261629 ; ; Class names are highlighted by cc-mode as defined in
16271630 ; ; c-class-decl-kwds, below regexp is a workaround for a bug
16281631 ; ; where the class names are not highlighted right after opening
@@ -1651,6 +1654,23 @@ a completion list."
16511654 (" \\ ?\\ (\\ (:?\\ sw\\ |\\ s_\\ )+\\ )\\ s-+\\ $" 1 font-lock-type-face )
16521655 (" function.+:\\ s-*\\ ??\\ (\\ (?:\\ sw\\ |\\ s_\\ )+\\ )" 1 font-lock-type-face )
16531656 (" )\\ 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 )
16541674 ))
16551675 " Detailed highlighting for PHP Mode." )
16561676
0 commit comments