Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add => to assignment operators #602

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions php-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,7 @@ but only if the setting is enabled"
(case-label . +)
(class-open . 0)
(comment-intro . 0)
(inexpr-class . 0)
(inlambda . 0)
(inline-open . 0)
(namespace-open . 0)
Expand Down Expand Up @@ -1550,7 +1551,7 @@ a completion list."
("\\(\\$\\)\\(this\\)\\>" (1 'php-$this-sigil) (2 'php-$this))
("\\(\\$+\\)\\(\\sw+\\)" (1 'php-variable-sigil) (2 'php-variable-name))
("\\(->\\)\\([a-zA-Z0-9_]+\\)" (1 'php-object-op) (2 'php-property-name))

;; Highlight function/method names
("\\<function\\s-+&?\\(\\(?:\\sw\\|\\s_\\)+\\)\\s-*(" 1 'php-function-name)

Expand Down Expand Up @@ -1625,7 +1626,7 @@ a completion list."

;; Highlight class name after "use .. as"
("\\<as\\s-+\\(\\sw+\\)" 1 font-lock-type-face)

;; Class names are highlighted by cc-mode as defined in
;; c-class-decl-kwds, below regexp is a workaround for a bug
;; where the class names are not highlighted right after opening
Expand Down Expand Up @@ -1656,7 +1657,7 @@ a completion list."
(")\\s-*:\\s-*\\??\\(\\(?:\\sw\\|\\s_\\)+\\)\\s-*\\(?:\{\\|;\\)" 1 font-lock-type-face)

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

;; Comparison operators (==, ===, >=, ...)
("\\([!=]=\\{1,2\\}[>]?\\|[<>]=?\\)" 1 'php-comparison-op)
Expand All @@ -1670,8 +1671,7 @@ a completion list."

;; Logical operators (and, or, &&, ...)
;; Not operator (!) is defined in "before cc-mode" section above.
("\\(&&\\|\|\|\\)" 1 'php-logical-op)
))
("\\(&&\\|||\\)" 1 'php-logical-op)))
"Detailed highlighting for PHP Mode.")

(defvar php-font-lock-keywords php-font-lock-keywords-3
Expand Down