Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

better regexps, @blah: and {blah: true, blah2:true}

  • Loading branch information...
commit 88e7b95c8b6855f41fa4d9271df1dfa690678d3c 1 parent eee29e0
@defunkt authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 coffee-mode.el
View
8 coffee-mode.el
@@ -99,12 +99,12 @@ print the compiled JavaScript.")
;; Define Language Syntax
;;
-;; Assignment
-(defvar coffee-type-regexp ".+?:")
-
;; Instance variables (implicit this)
(defvar coffee-constant-regexp "@\\w*\\|this")
+;; Assignment
+(defvar coffee-type-regexp "\\(\\w\\|\\.\\|_\\|$\\)+?:")
+
;; Booleans
(defvar coffee-functions-regexp "\\b\\(true\\|false\\|yes\\|no\\|on\\|off\\)\\b")
@@ -141,8 +141,8 @@ print the compiled JavaScript.")
;; Each class of keyword is given a particular face
(defvar coffee-font-lock-keywords
`(
- (,coffee-type-regexp . font-lock-type-face)
(,coffee-constant-regexp . font-lock-variable-name-face)
+ (,coffee-type-regexp . font-lock-type-face)
(,coffee-event-regexp . font-lock-builtin-face)
(,coffee-functions-regexp . font-lock-constant-face)
(,coffee-keywords-regexp . font-lock-keyword-face)
Please sign in to comment.
Something went wrong with that request. Please try again.