From b0d7c153a83f796465aeba6fc430be6e0c39a9f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Zugmeyer?= Date: Sun, 2 Oct 2016 16:41:22 +0200 Subject: [PATCH] add support for "for await" (asynchronous iteration) --- syntax/javascript.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/syntax/javascript.vim b/syntax/javascript.vim index b4ce555b..74b619b1 100644 --- a/syntax/javascript.vim +++ b/syntax/javascript.vim @@ -101,7 +101,7 @@ syntax keyword jsStatement contained break continue with yield debugger syntax keyword jsConditional if skipwhite skipempty nextgroup=jsParenIfElse syntax keyword jsConditional else skipwhite skipempty nextgroup=jsCommentMisc,jsIfElseBlock syntax keyword jsConditional switch skipwhite skipempty nextgroup=jsParenSwitch -syntax keyword jsRepeat while for skipwhite skipempty nextgroup=jsParenRepeat +syntax keyword jsRepeat while for skipwhite skipempty nextgroup=jsParenRepeat,jsForAwait syntax keyword jsDo do skipwhite skipempty nextgroup=jsRepeatBlock syntax keyword jsLabel contained case default syntax keyword jsTry try skipwhite skipempty nextgroup=jsTryCatchBlock @@ -164,6 +164,7 @@ syntax match jsFuncName contained /\<[a-zA-Z_$][0-9a-zA-Z_$]*\>/ s syntax region jsFuncArgExpression contained matchgroup=jsFuncArgOperator start=/=/ end=/[,)]\@=/ contains=@jsExpression extend syntax match jsFuncArgCommas contained ',' syntax keyword jsArguments contained arguments +syntax keyword jsForAwait contained await skipwhite skipempty nextgroup=jsParenRepeat " Matches a single keyword argument with no parens 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") HiLink jsFinally Exception HiLink jsCatch Exception HiLink jsAsyncKeyword Keyword + HiLink jsForAwait Keyword HiLink jsArrowFunction Type HiLink jsFunction Type HiLink jsGenerator jsFunction