Keywords 'of' and 'yield' for Javascript. (#7873)

Commit: 
https://github.com/vim/vim/commit/a5988f582e482150023862052d41e5215253a3de
Author: Yuri Klimov <[email protected]>
Date:   Fri Aug 18 01:03:23 2023 +0300

    Keywords 'of' and 'yield' for Javascript. 
(https://github.com/vim/vim/issues/7873)
    
    * Keyword 'of' in for...of statement.
    
    * Keyword 'yield' for generator function.

diff --git a/runtime/syntax/javascript.vim b/runtime/syntax/javascript.vim
index e51313798..cb2d16e2a 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

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1qWlGj-006euN-GV%40256bit.org.

Raspunde prin e-mail lui