diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2013-11-02 23:27:57 +0100 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2013-11-02 23:27:57 +0100 |
commit | 30c1920e4fa4e612238e1f435907c40ecfa47f33 (patch) | |
tree | f88ffb408895a5baf93fe81fdd12acba17f32d44 /syntax/coffee.vim | |
parent | 57cfac7ae384466c3ff2543a9200319dc1d459a0 (diff) | |
download | vim-polyglot-1.4.1.tar.gz vim-polyglot-1.4.1.zip |
Massive update :)v1.4.1
Diffstat (limited to 'syntax/coffee.vim')
-rwxr-xr-x | syntax/coffee.vim | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/syntax/coffee.vim b/syntax/coffee.vim index eea50840..7f8df73c 100755 --- a/syntax/coffee.vim +++ b/syntax/coffee.vim @@ -15,9 +15,6 @@ silent! unlet b:current_syntax " Highlight long strings. syntax sync fromstart -" CoffeeScript identifiers can have dollar signs. -setlocal isident+=$ - " These are `matches` instead of `keywords` because vim's highlighting " priority for keywords is higher than matches. This causes keywords to be " highlighted inside matches, even if a match says it shouldn't contain them -- @@ -67,7 +64,7 @@ syn match coffeeSpecialVar /\<\%(this\|prototype\|arguments\)\>/ display hi def link coffeeSpecialVar Special " An @-variable -syn match coffeeSpecialIdent /@\%(\I\i*\)\?/ display +syn match coffeeSpecialIdent /@\%(\%(\I\|\$\)\%(\i\|\$\)*\)\?/ display hi def link coffeeSpecialIdent Identifier " A class-like name that starts with a capital letter @@ -95,15 +92,16 @@ syn region coffeeString start=/'/ skip=/\\\\\|\\'/ end=/'/ hi def link coffeeString String " A integer, including a leading plus or minus -syn match coffeeNumber /\i\@<![-+]\?\d\+\%([eE][+-]\?\d\+\)\?/ display +syn match coffeeNumber /\%(\i\|\$\)\@<![-+]\?\d\+\%([eE][+-]\?\d\+\)\?/ display " A hex, binary, or octal number syn match coffeeNumber /\<0[xX]\x\+\>/ display syn match coffeeNumber /\<0[bB][01]\+\>/ display syn match coffeeNumber /\<0[oO][0-7]\+\>/ display +syn match coffeeNumber /\<\%(Infinity\|NaN\)\>/ display hi def link coffeeNumber Number " A floating-point number, including a leading plus or minus -syn match coffeeFloat /\i\@<![-+]\?\d*\.\@<!\.\d\+\%([eE][+-]\?\d\+\)\?/ +syn match coffeeFloat /\%(\i\|\$\)\@<![-+]\?\d*\.\@<!\.\d\+\%([eE][+-]\?\d\+\)\?/ \ display hi def link coffeeFloat Float @@ -114,7 +112,7 @@ syn match coffeeReservedError /\<\%(case\|default\|function\|var\|void\|with\|co hi def link coffeeReservedError Error " A normal object assignment -syn match coffeeObjAssign /@\?\I\i*\s*\ze::\@!/ contains=@coffeeIdentifier display +syn match coffeeObjAssign /@\?\%(\I\|\$\)\%(\i\|\$\)*\s*\ze::\@!/ contains=@coffeeIdentifier display hi def link coffeeObjAssign Identifier syn keyword coffeeTodo TODO FIXME XXX contained @@ -148,7 +146,7 @@ hi def link coffeeEscape SpecialChar " A regex -- must not follow a parenthesis, number, or identifier, and must not " be followed by a number -syn region coffeeRegex start=#\%(\%()\|\i\@<!\d\)\s*\|\i\)\@<!/=\@!\s\@!# +syn region coffeeRegex start=#\%(\%()\|\%(\i\|\$\)\@<!\d\)\s*\|\i\)\@<!/=\@!\s\@!# \ end=#/[gimy]\{,4}\d\@!# \ oneline contains=@coffeeBasicString,coffeeRegexCharSet syn region coffeeRegexCharSet start=/\[/ end=/]/ contained @@ -182,11 +180,11 @@ syn match coffeeSemicolonError /;$/ display hi def link coffeeSemicolonError Error " Ignore reserved words in dot accesses. -syn match coffeeDotAccess /\.\@<!\.\s*\I\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\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. |