Skip to content

Commit cfa1e34

Browse files
author
zeekay
committed
Update function and method definitions.
1 parent 860352f commit cfa1e34

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

syntax/coffee.vim

+2-7
Original file line numberDiff line numberDiff line change
@@ -119,16 +119,11 @@ syn match coffeeObjAssign /@\?\%(\I\|\$\)\%(\i\|\$\)*\s*\ze::\@!/ contains=@coff
119119
hi def link coffeeObjAssign Identifier
120120

121121
" A function definition
122-
syn match coffeeFunction /@\?\I.*\w\+\ze\s*=\s*\(=>\|->\|(\)/ contains=@coffeeIdentifier display
122+
syn match coffeeFunction /@\?\I.*\w\+\ze\s*=\s*\((.\{-})\)\=\s*\(=>\|->\)/ display
123123
hi def link coffeeFunction coffeeStatement
124124

125125
" A method definition
126-
syn match coffeeMethod /@\?\I.*\w\+\s*:\s*\(=>\|->\|(\)/ contains=@coffeeIdentifier display
127-
syn match coffeeFunction /@\?\I.*\w\+\ze\s*=\s*\(=>\|->\|(\)/ contains=@coffeeIdentifier display
128-
hi def link coffeeFunction coffeeStatement
129-
130-
" A method definition
131-
syn match coffeeMethod /@\?\I.*\w\+\s*:\s*\(=>\|->\|(\)/ contains=@coffeeIdentifier display
126+
syn match coffeeMethod /@\?\I.*\w\+\ze\s*:\s*\((.\{-})\)\=\s*\(=>\|->\)/ display
132127
hi def link coffeeMethod coffeeObjAssign
133128

134129
syn keyword coffeeTodo TODO FIXME XXX contained

0 commit comments

Comments
 (0)