Skip to content

Commit 52c2255

Browse files
committed
Adds es6 support for rest parameters in function signatures
1 parent 776b7bc commit 52c2255

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

syntax/javascript.vim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,9 @@ else
208208
endif
209209

210210
syntax match jsFuncName contained /\<[a-zA-Z_$][0-9a-zA-Z_$]*/ nextgroup=jsFuncArgs skipwhite
211-
syntax region jsFuncArgs contained matchgroup=jsFuncParens start='(' end=')' contains=jsFuncArgCommas nextgroup=jsFuncBlock keepend skipwhite skipempty
211+
syntax region jsFuncArgs contained matchgroup=jsFuncParens start='(' end=')' contains=jsFuncArgCommas,jsFuncArgRest nextgroup=jsFuncBlock keepend skipwhite skipempty
212212
syntax match jsFuncArgCommas contained ','
213+
syntax match jsFuncArgRest contained /\.\.\.[a-zA-Z_$][0-9a-zA-Z_$]*/
213214
syntax keyword jsArgsObj arguments contained containedin=jsFuncBlock
214215

215216
" Define the default highlighting.

0 commit comments

Comments
 (0)