Skip to content

Commit 06a3b81

Browse files
authored
Merge pull request #654 from BenoitZugmeyer/develop
Add support for "for await" (asynchronous iteration)
2 parents ba0ae27 + b0d7c15 commit 06a3b81

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: syntax/javascript.vim

+3-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ syntax keyword jsStatement contained break continue with yield debugger
101101
syntax keyword jsConditional if skipwhite skipempty nextgroup=jsParenIfElse
102102
syntax keyword jsConditional else skipwhite skipempty nextgroup=jsCommentMisc,jsIfElseBlock
103103
syntax keyword jsConditional switch skipwhite skipempty nextgroup=jsParenSwitch
104-
syntax keyword jsRepeat while for skipwhite skipempty nextgroup=jsParenRepeat
104+
syntax keyword jsRepeat while for skipwhite skipempty nextgroup=jsParenRepeat,jsForAwait
105105
syntax keyword jsDo do skipwhite skipempty nextgroup=jsRepeatBlock
106106
syntax keyword jsLabel contained case default
107107
syntax keyword jsTry try skipwhite skipempty nextgroup=jsTryCatchBlock
@@ -164,6 +164,7 @@ syntax match jsFuncName contained /\<[a-zA-Z_$][0-9a-zA-Z_$]*\>/ s
164164
syntax region jsFuncArgExpression contained matchgroup=jsFuncArgOperator start=/=/ end=/[,)]\@=/ contains=@jsExpression extend
165165
syntax match jsFuncArgCommas contained ','
166166
syntax keyword jsArguments contained arguments
167+
syntax keyword jsForAwait contained await skipwhite skipempty nextgroup=jsParenRepeat
167168

168169
" Matches a single keyword argument with no parens
169170
syntax match jsArrowFuncArgs /\k\+\s*\%(=>\)\@=/ skipwhite contains=jsFuncArgs skipwhite skipempty nextgroup=jsArrowFunction extend
@@ -275,6 +276,7 @@ if version >= 508 || !exists("did_javascript_syn_inits")
275276
HiLink jsFinally Exception
276277
HiLink jsCatch Exception
277278
HiLink jsAsyncKeyword Keyword
279+
HiLink jsForAwait Keyword
278280
HiLink jsArrowFunction Type
279281
HiLink jsFunction Type
280282
HiLink jsGenerator jsFunction

0 commit comments

Comments
 (0)