diff --git a/php-mode.el b/php-mode.el index faf2ec5b..4c22632a 100644 --- a/php-mode.el +++ b/php-mode.el @@ -1657,7 +1657,7 @@ a completion list." (")\\s-*:\\s-*\\??\\(\\(?:\\sw\\|\\s_\\)+\\)\\s-*\\(?:\{\\|;\\)" 1 font-lock-type-face) ;; Assignment operators (=, +=, ...) - ("\\([^=]+?\\([\-+./%]?=\\)[^=]+?\\)" 2 'php-assignment-op) + ("\\([^=]+?\\([\-+./%]?=\\)[^==, ...) ("\\([!=]=\\{1,2\\}[>]?\\|[<>]=?\\)" 1 'php-comparison-op) diff --git a/tests/7.4/arrow-function.php.faces b/tests/7.4/arrow-function.php.faces index 98e9a62c..acfcbc5d 100644 --- a/tests/7.4/arrow-function.php.faces +++ b/tests/7.4/arrow-function.php.faces @@ -18,7 +18,8 @@ ("(") ("$" . php-variable-sigil) ("x" . php-variable-name) - (") =") + (") ") + ("=" . php-assignment-op) (">" . php-comparison-op) (" ") ("$" . php-variable-sigil) @@ -38,7 +39,8 @@ ("(") ("$" . php-variable-sigil) ("x" . php-variable-name) - (") =") + (") ") + ("=" . php-assignment-op) (">" . php-comparison-op) (" ") ("$" . php-variable-sigil) @@ -63,14 +65,16 @@ ("(") ("$" . php-variable-sigil) ("x" . php-variable-name) - (") =") + (") ") + ("=" . php-assignment-op) (">" . php-comparison-op) (" ") ("fn" . php-keyword) ("(") ("$" . php-variable-sigil) ("y" . php-variable-name) - (") =") + (") ") + ("=" . php-assignment-op) (">" . php-comparison-op) (" ") ("$" . php-variable-sigil)