Permalink
Browse files

Don't clobber numbers in accesses

  • Loading branch information...
1 parent 5eb3a34 commit 85d0d8bd7fb04ee540c1c8ab7fb10b04d449003e @kchmck committed Aug 6, 2011
Showing with 6 additions and 2 deletions.
  1. +2 −2 syntax/coffee.vim
  2. +4 −0 test/test-reserved.coffee
View
@@ -193,11 +193,11 @@ if !exists("coffee_no_trailing_semicolon_error")
endif
" Ignore reserved words in dot accesses.
-syn match coffeeDotAccess /\.\@<!\.\s*\i\+/he=s+1 contains=@coffeeIdentifier
+syn match coffeeDotAccess /\.\@<!\.\s*\I\i*/he=s+1 contains=@coffeeIdentifier
hi def link coffeeDotAccess coffeeExtendedOp
" Ignore reserved words in prototype accesses.
-syn match coffeeProtoAccess /::\s*\i\+/he=s+2 contains=@coffeeIdentifier
+syn match coffeeProtoAccess /::\s*\I\i*/he=s+2 contains=@coffeeIdentifier
hi def link coffeeProtoAccess coffeeExtendedOp
" This is required for interpolations to work.
@@ -21,3 +21,7 @@ abc::true
abc:: function
abc. function
+# Numbers should be highlighted
+def.42
+def .42
+def::42

0 comments on commit 85d0d8b

Please sign in to comment.