@@ -39,11 +39,17 @@ syn match coffeeKeyword /\<for\s\+own\>/ contained containedin=coffeeRepeat
3939\ display
4040hi def link coffeeKeyword Keyword
4141
42- syn match coffeeOperator / \<\% ( instanceof\| typeof\| delete \)\> / display
42+ syn keyword coffeeOperator instanceof typeof delete
4343hi def link coffeeOperator Operator
4444
45+ syn match coffeeLength / \% (.*\)\. length/ hs =e - 5
46+ hi def link coffeeLength Label
47+
48+ syn match coffeeFunction / \s\? [-=]>/
49+ hi def link coffeeFunction Function
50+
4551" The first case matches symbol operators only if they have an operand before.
46- syn match coffeeExtendedOp / \% (\S\s *\)\@ <=[+\- */%&|\^ =!<>?.]\{ -1,}\| [-=]> \| --\| ++\| :/
52+ syn match coffeeExtendedOp / \% (\S\s *\)\@ <=[+\- */%&|\^ =!<>?.]\{ -1,}\| --\| ++\| :/
4753\ display
4854syn match coffeeExtendedOp / \<\% (and\| or\) =/ display
4955hi def link coffeeExtendedOp coffeeOperator
@@ -214,7 +220,7 @@ syn cluster coffeeAll contains=coffeeStatement,coffeeRepeat,coffeeConditional,
214220\ coffeeHeredoc,coffeeSpaceError,
215221\ coffeeSemicolonError,coffeeDotAccess,
216222\ coffeeProtoAccess,coffeeCurlies,coffeeBrackets,
217- \ coffeeParens
223+ \ coffeeParens,coffeeFunction,coffeeLength
218224
219225if ! exists (' b:current_syntax' )
220226 let b: current_syntax = ' coffee'
0 commit comments