Skip to content

Commit 6d167f1

Browse files
committed
Adds support for default arguments
1 parent b3c811b commit 6d167f1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

syntax/javascript.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ exe 'syntax match jsFunction /\<function\>/ nextgroup=jsGenerator,jsFuncName,jsF
213213

214214
syntax match jsGenerator contained '\*' nextgroup=jsFuncName skipwhite
215215
syntax match jsFuncName contained /\<[a-zA-Z_$][0-9a-zA-Z_$]*/ nextgroup=jsFuncArgs skipwhite
216-
syntax region jsFuncArgs contained matchgroup=jsFuncParens start='(' end=')' contains=jsFuncArgCommas,jsFuncArgRest nextgroup=jsFuncBlock keepend skipwhite skipempty
216+
syntax region jsFuncArgs contained matchgroup=jsFuncParens start='(' end=')' contains=jsFuncArgCommas,jsFuncArgRest,jsAssignmentExpr nextgroup=jsFuncBlock keepend skipwhite skipempty
217217
syntax match jsFuncArgCommas contained ','
218218
syntax match jsFuncArgRest contained /\%(\.\.\.[a-zA-Z_$][0-9a-zA-Z_$]*\))/
219219
syntax keyword jsArgsObj arguments contained containedin=jsFuncBlock

0 commit comments

Comments
 (0)