comparison vendor/vim-syntax/javascript.vim @ 688:17cacf387f7c

Update vendor ...also update scripts to support syntax subdirectories
author nanaya <me@nanaya.pro>
date Fri, 21 Oct 2022 20:17:06 +0900
parents c74dffea6a0a
children 78469331407e
comparison
equal deleted inserted replaced
687:ae7f2fb75cdf 688:17cacf387f7c
5 " URL: http://www.fleiner.com/vim/syntax/javascript.vim 5 " URL: http://www.fleiner.com/vim/syntax/javascript.vim
6 " Changes: (ss) added keywords, reserved words, and other identifiers 6 " Changes: (ss) added keywords, reserved words, and other identifiers
7 " (ss) repaired several quoting and grouping glitches 7 " (ss) repaired several quoting and grouping glitches
8 " (ss) fixed regex parsing issue with multiple qualifiers [gi] 8 " (ss) fixed regex parsing issue with multiple qualifiers [gi]
9 " (ss) additional factoring of keywords, globals, and members 9 " (ss) additional factoring of keywords, globals, and members
10 " Last Change: 2021 Mar 30 10 " Last Change: 2022 Jun 09
11 " 2013 Jun 12: adjusted javaScriptRegexpString (Kevin Locke) 11 " 2013 Jun 12: adjusted javaScriptRegexpString (Kevin Locke)
12 " 2018 Apr 14: adjusted javaScriptRegexpString (LongJohnCoder) 12 " 2018 Apr 14: adjusted javaScriptRegexpString (LongJohnCoder)
13 13
14 " tuning parameters: 14 " tuning parameters:
15 " unlet javaScript_fold 15 " unlet javaScript_fold
37 syn region javaScriptStringS start=+'+ skip=+\\\\\|\\'+ end=+'\|$+ contains=javaScriptSpecial,@htmlPreproc 37 syn region javaScriptStringS start=+'+ skip=+\\\\\|\\'+ end=+'\|$+ contains=javaScriptSpecial,@htmlPreproc
38 syn region javaScriptStringT start=+`+ skip=+\\\\\|\\`+ end=+`+ contains=javaScriptSpecial,javaScriptEmbed,@htmlPreproc 38 syn region javaScriptStringT start=+`+ skip=+\\\\\|\\`+ end=+`+ contains=javaScriptSpecial,javaScriptEmbed,@htmlPreproc
39 39
40 syn region javaScriptEmbed start=+${+ end=+}+ contains=@javaScriptEmbededExpr 40 syn region javaScriptEmbed start=+${+ end=+}+ contains=@javaScriptEmbededExpr
41 41
42 " number handling by Christopher Leonard chris.j.leonard@gmx.com
42 syn match javaScriptSpecialCharacter "'\\.'" 43 syn match javaScriptSpecialCharacter "'\\.'"
43 syn match javaScriptNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>" 44 syn match javaScriptNumber "\<0[bB][0-1]\+\(_[0-1]\+\)*\>"
44 syn match javaScriptNumber "-\=\<\d\+\%(_\d\+\)*\>" 45 syn match javaScriptNumber "\<0[oO][0-7]\+\(_[0-7]\+\)*\>"
46 syn match javaScriptNumber "\<0\([0-7]\+\(_[0-7]\+\)*\)\?\>"
47 syn match javaScriptNumber "\<0[xX][0-9a-fA-F]\+\(_[0-9a-fA-F]\+\)*\>"
48 syn match javaScriptNumber "\<\d\+\(_\d\+\)*[eE][+-]\?\d\+\>"
49 syn match javaScriptNumber "\<[1-9]\d*\(_\d\+\)*\(\.\(\d\+\(_\d\+\)*\([eE][+-]\?\d\+\)\?\)\?\)\?\>"
50 syn match javaScriptNumber "\<\(\d\+\(_\d\+\)*\)\?\.\d\+\(_\d\+\)*\([eE][+-]\?\d\+\)\?\>"
51 syn match javaScriptNumber "\<\d\+\(_\d\+\)*\.\(\d\+\(_\d\+\)*\([eE][+-]\?\d\+\)\?\)\?\>"
45 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 52 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
46 53
47 syn keyword javaScriptConditional if else switch 54 syn keyword javaScriptConditional if else switch
48 syn keyword javaScriptRepeat while for do in 55 syn keyword javaScriptRepeat while for do in
49 syn keyword javaScriptBranch break continue 56 syn keyword javaScriptBranch break continue