Skip to content

Commit 8a8693b

Browse files
authored
Merge pull request #603 from emacs-php/face/add-assign-op
Add => to assignment operators
2 parents fc1173e + bb80050 commit 8a8693b

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

php-mode.el

+1-1
Original file line numberDiff line numberDiff line change
@@ -1657,7 +1657,7 @@ a completion list."
16571657
(")\\s-*:\\s-*\\??\\(\\(?:\\sw\\|\\s_\\)+\\)\\s-*\\(?:\{\\|;\\)" 1 font-lock-type-face)
16581658

16591659
;; Assignment operators (=, +=, ...)
1660-
("\\([^=<!>]+?\\([\-+./%]?=\\)[^=<!>]+?\\)" 2 'php-assignment-op)
1660+
("\\([^=<!>]+?\\([\-+./%]?=\\)[^=<!]+?\\)" 2 'php-assignment-op)
16611661

16621662
;; Comparison operators (==, ===, >=, ...)
16631663
("\\([!=]=\\{1,2\\}[>]?\\|[<>]=?\\)" 1 'php-comparison-op)

tests/7.4/arrow-function.php.faces

+8-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
("(")
1919
("$" . php-variable-sigil)
2020
("x" . php-variable-name)
21-
(") =")
21+
(") ")
22+
("=" . php-assignment-op)
2223
(">" . php-comparison-op)
2324
(" ")
2425
("$" . php-variable-sigil)
@@ -38,7 +39,8 @@
3839
("(")
3940
("$" . php-variable-sigil)
4041
("x" . php-variable-name)
41-
(") =")
42+
(") ")
43+
("=" . php-assignment-op)
4244
(">" . php-comparison-op)
4345
(" ")
4446
("$" . php-variable-sigil)
@@ -63,14 +65,16 @@
6365
("(")
6466
("$" . php-variable-sigil)
6567
("x" . php-variable-name)
66-
(") =")
68+
(") ")
69+
("=" . php-assignment-op)
6770
(">" . php-comparison-op)
6871
(" ")
6972
("fn" . php-keyword)
7073
("(")
7174
("$" . php-variable-sigil)
7275
("y" . php-variable-name)
73-
(") =")
76+
(") ")
77+
("=" . php-assignment-op)
7478
(">" . php-comparison-op)
7579
(" ")
7680
("$" . php-variable-sigil)

0 commit comments

Comments
 (0)