Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added support for the shorthand::syntax for .prototype.

  • Loading branch information...
commit dc85f42f3fc26a5b4815b51b961ea9223d4f6334 1 parent e3c21f8
@tav tav authored committed
Showing with 4 additions and 0 deletions.
  1. +4 −0 coffee-mode.el
View
4 coffee-mode.el
@@ -230,6 +230,9 @@ print the compiled JavaScript."
;; Instance variables (implicit this)
(defvar coffee-this-regexp "@\\w*\\|this")
+;; Prototype::access
+(defvar coffee-prototype-regexp "\\(\\(\\w\\|\\.\\|_\\| \\|$\\)+?\\)::\\(\\(\\w\\|\\.\\|_\\| \\|$\\)+?\\):")
+
;; Assignment
(defvar coffee-assign-regexp "\\(\\(\\w\\|\\.\\|_\\| \\|$\\)+?\\):")
@@ -278,6 +281,7 @@ print the compiled JavaScript."
;; because otherwise the keyword "state" in the function
;; "state_entry" would be highlighted.
`((,coffee-this-regexp . font-lock-variable-name-face)
+ (,coffee-prototype-regexp . font-lock-variable-name-face)
(,coffee-assign-regexp . font-lock-type-face)
(,coffee-regexp-regexp . font-lock-constant-face)
(,coffee-boolean-regexp . font-lock-constant-face)
Please sign in to comment.
Something went wrong with that request. Please try again.