Permalink
Browse files

Merge pull request #120 from syohex/string-interpolation-highlight

implement string interpolation highlight
  • Loading branch information...
2 parents 8b1be11 + e5bb92d commit cf96f6cb4cf21d6d713231c86040914509863a29 @jart jart committed Apr 9, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 coffee-mode.el
View
@@ -418,6 +418,9 @@ called `coffee-compiled-buffer-name'."
(defvar coffee-regexp-regexp "\\/\\(\\\\.\\|\\[\\(\\\\.\\|.\\)+?\\]\\|[^/
]\\)+?\\/")
+;; String Interpolation(This regexp is taken from ruby-mode)
+(defvar coffee-string-interpolation-regexp "#{[^}\n\\\\]*\\(?:\\\\.[^}\n\\\\]*\\)*}")
+
;; JavaScript Keywords
(defvar coffee-js-keywords
'("if" "else" "new" "return" "try" "catch"
@@ -482,7 +485,8 @@ called `coffee-compiled-buffer-name'."
(,coffee-regexp-regexp . font-lock-constant-face)
(,coffee-boolean-regexp . font-lock-constant-face)
(,coffee-class-regexp 2 'coffee-mode-class-name)
- (,coffee-keywords-regexp 1 font-lock-keyword-face)))
+ (,coffee-keywords-regexp 1 font-lock-keyword-face)
+ (,coffee-string-interpolation-regexp 0 font-lock-variable-name-face t)))
;;
;; Helper Functions

0 comments on commit cf96f6c

Please sign in to comment.