comparison vendor/vim-syntax/javascript.vim @ 726:78469331407e

Update syntaxes
author nanaya <me@nanaya.net>
date Mon, 19 Aug 2024 17:04:13 +0900
parents 17cacf387f7c
children
comparison
equal deleted inserted replaced
725:0a896ffe3029 726:78469331407e
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: 2022 Jun 09 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 " 2024 Aug 14: fix a few stylistic issues (#15480)
13 14
14 " tuning parameters: 15 " tuning parameters:
15 " unlet javaScript_fold 16 " unlet javaScript_fold
16 17
17 if !exists("main_syntax") 18 if !exists("main_syntax")
50 syn match javaScriptNumber "\<\(\d\+\(_\d\+\)*\)\?\.\d\+\(_\d\+\)*\([eE][+-]\?\d\+\)\?\>" 51 syn match javaScriptNumber "\<\(\d\+\(_\d\+\)*\)\?\.\d\+\(_\d\+\)*\([eE][+-]\?\d\+\)\?\>"
51 syn match javaScriptNumber "\<\d\+\(_\d\+\)*\.\(\d\+\(_\d\+\)*\([eE][+-]\?\d\+\)\?\)\?\>" 52 syn match javaScriptNumber "\<\d\+\(_\d\+\)*\.\(\d\+\(_\d\+\)*\([eE][+-]\?\d\+\)\?\)\?\>"
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 53 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
53 54
54 syn keyword javaScriptConditional if else switch 55 syn keyword javaScriptConditional if else switch
55 syn keyword javaScriptRepeat while for do in 56 syn keyword javaScriptRepeat while for do in of
56 syn keyword javaScriptBranch break continue 57 syn keyword javaScriptBranch break continue
57 syn keyword javaScriptOperator new delete instanceof typeof 58 syn keyword javaScriptOperator new delete instanceof typeof
58 syn keyword javaScriptType Array Boolean Date Function Number Object String RegExp 59 syn keyword javaScriptType Array Boolean Date Function Number Object String RegExp
59 syn keyword javaScriptStatement return with await 60 syn keyword javaScriptStatement return with await yield
60 syn keyword javaScriptBoolean true false 61 syn keyword javaScriptBoolean true false
61 syn keyword javaScriptNull null undefined 62 syn keyword javaScriptNull null undefined
62 syn keyword javaScriptIdentifier arguments this var let 63 syn keyword javaScriptIdentifier arguments this
63 syn keyword javaScriptLabel case default 64 syn keyword javaScriptLabel case default
64 syn keyword javaScriptException try catch finally throw 65 syn keyword javaScriptException try catch finally throw
65 syn keyword javaScriptMessage alert confirm prompt status 66 syn keyword javaScriptMessage alert confirm prompt status
66 syn keyword javaScriptGlobal self window top parent 67 syn keyword javaScriptGlobal self window top parent
67 syn keyword javaScriptMember document event location 68 syn keyword javaScriptMember document event location
68 syn keyword javaScriptDeprecated escape unescape 69 syn keyword javaScriptDeprecated escape unescape
69 syn keyword javaScriptReserved abstract boolean byte char class const debugger double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile async 70 syn keyword javaScriptReserved abstract boolean byte char class const debugger double enum export extends final float from goto implements import int interface let long native package private protected public short super synchronized throws transient var volatile async
71 syn keyword javaScriptModifier static
70 72
71 syn cluster javaScriptEmbededExpr contains=javaScriptBoolean,javaScriptNull,javaScriptIdentifier,javaScriptStringD,javaScriptStringS,javaScriptStringT 73 syn cluster javaScriptEmbededExpr contains=javaScriptBoolean,javaScriptNull,javaScriptIdentifier,javaScriptStringD,javaScriptStringS,javaScriptStringT
72 74
73 if exists("javaScript_fold") 75 if exists("javaScript_fold")
74 syn match javaScriptFunction "\<function\>" 76 syn match javaScriptFunction "\<function\>"
101 hi def link javaScriptStringS String 103 hi def link javaScriptStringS String
102 hi def link javaScriptStringD String 104 hi def link javaScriptStringD String
103 hi def link javaScriptStringT String 105 hi def link javaScriptStringT String
104 hi def link javaScriptCharacter Character 106 hi def link javaScriptCharacter Character
105 hi def link javaScriptSpecialCharacter javaScriptSpecial 107 hi def link javaScriptSpecialCharacter javaScriptSpecial
106 hi def link javaScriptNumber javaScriptValue 108 hi def link javaScriptNumber Number
107 hi def link javaScriptConditional Conditional 109 hi def link javaScriptConditional Conditional
108 hi def link javaScriptRepeat Repeat 110 hi def link javaScriptRepeat Repeat
109 hi def link javaScriptBranch Conditional 111 hi def link javaScriptBranch Conditional
110 hi def link javaScriptOperator Operator 112 hi def link javaScriptOperator Operator
111 hi def link javaScriptType Type 113 hi def link javaScriptType Type
112 hi def link javaScriptStatement Statement 114 hi def link javaScriptStatement Statement
113 hi def link javaScriptFunction Function 115 hi def link javaScriptFunction Keyword
114 hi def link javaScriptBraces Function 116 hi def link javaScriptBraces Function
115 hi def link javaScriptError Error 117 hi def link javaScriptError Error
116 hi def link javaScrParenError javaScriptError 118 hi def link javaScrParenError javaScriptError
117 hi def link javaScriptNull Keyword 119 hi def link javaScriptNull Keyword
118 hi def link javaScriptBoolean Boolean 120 hi def link javaScriptBoolean Boolean
124 hi def link javaScriptMessage Keyword 126 hi def link javaScriptMessage Keyword
125 hi def link javaScriptGlobal Keyword 127 hi def link javaScriptGlobal Keyword
126 hi def link javaScriptMember Keyword 128 hi def link javaScriptMember Keyword
127 hi def link javaScriptDeprecated Exception 129 hi def link javaScriptDeprecated Exception
128 hi def link javaScriptReserved Keyword 130 hi def link javaScriptReserved Keyword
131 hi def link javaScriptModifier StorageClass
129 hi def link javaScriptDebug Debug 132 hi def link javaScriptDebug Debug
130 hi def link javaScriptConstant Label 133 hi def link javaScriptConstant Label
131 hi def link javaScriptEmbed Special 134 hi def link javaScriptEmbed Special
132 135
133 136