summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuri Klimov <yuri@klimov.net>2023-08-18 01:03:23 +0300
committerGitHub <noreply@github.com>2023-08-18 00:03:23 +0200
commita5988f582e482150023862052d41e5215253a3de (patch)
tree4db7a57458b6cb14f52da4b3bad4f9f74be71d72
parente9ef347c137aca6c2592beb19da45a8aece65e11 (diff)
Keywords 'of' and 'yield' for Javascript. (#7873)
* Keyword 'of' in for...of statement. * Keyword 'yield' for generator function.
-rw-r--r--runtime/syntax/javascript.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/syntax/javascript.vim b/runtime/syntax/javascript.vim
index e513137984..cb2d16e2a7 100644
--- a/runtime/syntax/javascript.vim
+++ b/runtime/syntax/javascript.vim
@@ -52,11 +52,11 @@ syn match javaScriptNumber "\<\d\+\(_\d\+\)*\.\(\d\+\(_\d\+\)*\([eE]
syn region javaScriptRegexpString start=+[,(=+]\s*/[^/*]+ms=e-1,me=e-1 skip=+\\\\\|\\/+ end=+/[gimuys]\{0,2\}\s*$+ end=+/[gimuys]\{0,2\}\s*[+;.,)\]}]+me=e-1 end=+/[gimuys]\{0,2\}\s\+\/+me=e-1 contains=@htmlPreproc,javaScriptComment oneline
syn keyword javaScriptConditional if else switch
-syn keyword javaScriptRepeat while for do in
+syn keyword javaScriptRepeat while for do in of
syn keyword javaScriptBranch break continue
syn keyword javaScriptOperator new delete instanceof typeof
syn keyword javaScriptType Array Boolean Date Function Number Object String RegExp
-syn keyword javaScriptStatement return with await
+syn keyword javaScriptStatement return with await yield
syn keyword javaScriptBoolean true false
syn keyword javaScriptNull null undefined
syn keyword javaScriptIdentifier arguments this var let