From a38c15b38c7ce5be90453572d42ce14012bd6cdb Mon Sep 17 00:00:00 2001 From: Demis Balbach Date: Fri, 20 Dec 2019 10:01:35 +0100 Subject: [PATCH 1/2] Add => to assignment operators --- php-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) From bb800503e7e7c0b8658dff34d501f21b9b83a893 Mon Sep 17 00:00:00 2001 From: USAMI Kenta Date: Mon, 23 Dec 2019 22:45:42 +0900 Subject: [PATCH 2/2] Fix test for assignment-op --- tests/7.4/arrow-function.php.faces | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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)