Mercurial > ec-dotfiles
comparison vendor/vim-syntax/shared/typescriptcommon.vim @ 726:78469331407e default tip
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 |
---|---|
1 " Vim syntax file | 1 " Vim syntax file |
2 " Language: TypeScript and TypeScriptReact | 2 " Language: TypeScript and TypeScriptReact |
3 " Maintainer: Bram Moolenaar, Herrington Darkholme | 3 " Maintainer: Herrington Darkholme |
4 " Last Change: 2021 Sep 22 | 4 " Last Change: 2024 May 24 |
5 " Based On: Herrington Darkholme's yats.vim | 5 " Based On: Herrington Darkholme's yats.vim |
6 " Changes: See https:github.com/HerringtonDarkholme/yats.vim | 6 " Changes: See https://github.com/HerringtonDarkholme/yats.vim |
7 " Credits: See yats.vim on github | 7 " Credits: See yats.vim on github |
8 | 8 |
9 if &cpo =~ 'C' | 9 if &cpo =~ 'C' |
10 let s:cpo_save = &cpo | 10 let s:cpo_save = &cpo |
11 set cpo&vim | 11 set cpo&vim |
47 \ transparent | 47 \ transparent |
48 \ contains=@props | 48 \ contains=@props |
49 \ nextgroup=@afterIdentifier | 49 \ nextgroup=@afterIdentifier |
50 \ skipwhite skipempty | 50 \ skipwhite skipempty |
51 | 51 |
52 syntax region typescriptIndexExpr contained matchgroup=typescriptProperty start=/\[/rs=s+1 end=/]/he=e-1 contains=@typescriptValue nextgroup=@typescriptSymbols,typescriptDotNotation,typescriptFuncCallArg skipwhite skipempty | 52 syntax region typescriptIndexExpr contained matchgroup=typescriptProperty start=/\[/ end=/]/ contains=@typescriptValue,typescriptCastKeyword nextgroup=@typescriptSymbols,typescriptDotNotation,typescriptFuncCallArg skipwhite skipempty |
53 | 53 |
54 syntax match typescriptDotNotation /\.\|?\.\|!\./ nextgroup=typescriptProp skipnl | 54 syntax match typescriptDotNotation /\.\|?\.\|!\./ nextgroup=typescriptProp skipnl |
55 syntax match typescriptDotStyleNotation /\.style\./ nextgroup=typescriptDOMStyle transparent | 55 syntax match typescriptDotStyleNotation /\.style\./ nextgroup=typescriptDOMStyle transparent |
56 " syntax match typescriptFuncCall contained /[a-zA-Z]\k*\ze(/ nextgroup=typescriptFuncCallArg | 56 " syntax match typescriptFuncCall contained /[a-zA-Z]\k*\ze(/ nextgroup=typescriptFuncCallArg |
57 syntax region typescriptParenExp matchgroup=typescriptParens start=/(/ end=/)/ contains=@typescriptComments,@typescriptValue,typescriptCastKeyword nextgroup=@typescriptSymbols skipwhite skipempty | 57 syntax region typescriptParenExp matchgroup=typescriptParens start=/(/ end=/)/ contains=@typescriptComments,@typescriptValue,typescriptCastKeyword nextgroup=@typescriptSymbols skipwhite skipempty |
58 syntax region typescriptFuncCallArg contained matchgroup=typescriptParens start=/(/ end=/)/ contains=@typescriptValue,@typescriptComments nextgroup=@typescriptSymbols,typescriptDotNotation skipwhite skipempty skipnl | 58 syntax region typescriptFuncCallArg contained matchgroup=typescriptParens start=/(/ end=/)/ contains=@typescriptValue,@typescriptComments,typescriptCastKeyword nextgroup=@typescriptSymbols,typescriptDotNotation skipwhite skipempty skipnl |
59 syntax region typescriptEventFuncCallArg contained matchgroup=typescriptParens start=/(/ end=/)/ contains=@typescriptEventExpression | 59 syntax region typescriptEventFuncCallArg contained matchgroup=typescriptParens start=/(/ end=/)/ contains=@typescriptEventExpression |
60 syntax region typescriptEventString contained start=/\z(["']\)/ skip=/\\\\\|\\\z1\|\\\n/ end=/\z1\|$/ contains=typescriptASCII,@events | 60 syntax region typescriptEventString contained start=/\z(["']\)/ skip=/\\\\\|\\\z1\|\\\n/ end=/\z1\|$/ contains=typescriptASCII,@events |
61 | 61 |
62 syntax region typescriptDestructureString | 62 syntax region typescriptDestructureString |
63 \ start=/\z(["']\)/ skip=/\\\\\|\\\z1\|\\\n/ end=/\z1\|$/ | 63 \ start=/\z(["']\)/ skip=/\\\\\|\\\z1\|\\\n/ end=/\z1\|$/ |
114 " String | 114 " String |
115 syntax match typescriptASCII contained /\\\d\d\d/ | 115 syntax match typescriptASCII contained /\\\d\d\d/ |
116 | 116 |
117 syntax region typescriptTemplateSubstitution matchgroup=typescriptTemplateSB | 117 syntax region typescriptTemplateSubstitution matchgroup=typescriptTemplateSB |
118 \ start=/\${/ end=/}/ | 118 \ start=/\${/ end=/}/ |
119 \ contains=@typescriptValue | 119 \ contains=@typescriptValue,typescriptCastKeyword |
120 \ contained | 120 \ contained |
121 | 121 |
122 | 122 |
123 syntax region typescriptString | 123 syntax region typescriptString |
124 \ start=+\z(["']\)+ skip=+\\\%(\z1\|$\)+ end=+\z1+ end=+$+ | 124 \ start=+\z(["']\)+ skip=+\\\%(\z1\|$\)+ end=+\z1+ end=+$+ |
125 \ contains=typescriptSpecial,@Spell | 125 \ contains=typescriptSpecial,@Spell |
126 \ nextgroup=@typescriptSymbols | |
127 \ skipwhite skipempty | |
126 \ extend | 128 \ extend |
127 | 129 |
128 syntax match typescriptSpecial contained "\v\\%(x\x\x|u%(\x{4}|\{\x{1,6}})|c\u|.)" | 130 syntax match typescriptSpecial contained "\v\\%(x\x\x|u%(\x{4}|\{\x{1,6}})|c\u|.)" |
129 | 131 |
130 " From vim runtime | 132 " From pangloss/vim-javascript |
131 " <https://github.com/vim/vim/blob/master/runtime/syntax/javascript.vim#L48> | 133 " <https://github.com/pangloss/vim-javascript/blob/d6e137563c47fb59f26ed25d044c0c7532304f18/syntax/javascript.vim#L64-L72> |
132 syntax region typescriptRegexpString start=+/[^/*]+me=e-1 skip=+\\\\\|\\/+ end=+/[gimuy]\{0,5\}\s*$+ end=+/[gimuy]\{0,5\}\s*[;.,)\]}:]+me=e-1 nextgroup=typescriptDotNotation oneline | 134 syntax region typescriptRegexpCharClass contained start=+\[+ skip=+\\.+ end=+\]+ contains=typescriptSpecial extend |
135 syntax match typescriptRegexpBoundary contained "\v\c[$^]|\\b" | |
136 syntax match typescriptRegexpBackRef contained "\v\\[1-9]\d*" | |
137 syntax match typescriptRegexpQuantifier contained "\v[^\\]%([?*+]|\{\d+%(,\d*)?})\??"lc=1 | |
138 syntax match typescriptRegexpOr contained "|" | |
139 syntax match typescriptRegexpMod contained "\v\(\?[:=!>]"lc=1 | |
140 syntax region typescriptRegexpGroup contained start="[^\\]("lc=1 skip="\\.\|\[\(\\.\|[^]]\+\)\]" end=")" contains=typescriptRegexpCharClass,@typescriptRegexpSpecial keepend | |
141 syntax region typescriptRegexpString | |
142 \ start=+\%(\%(\<return\|\<typeof\|\_[^)\]'"[:blank:][:alnum:]_$]\)\s*\)\@<=/\ze[^*/]+ skip=+\\.\|\[[^]]\{1,}\]+ end=+/[gimyus]\{,6}+ | |
143 \ contains=typescriptRegexpCharClass,typescriptRegexpGroup,@typescriptRegexpSpecial | |
144 \ oneline keepend extend | |
145 syntax cluster typescriptRegexpSpecial contains=typescriptSpecial,typescriptRegexpBoundary,typescriptRegexpBackRef,typescriptRegexpQuantifier,typescriptRegexpOr,typescriptRegexpMod | |
133 | 146 |
134 syntax region typescriptTemplate | 147 syntax region typescriptTemplate |
135 \ start=/`/ skip=/\\\\\|\\`\|\n/ end=/`\|$/ | 148 \ start=/`/ skip=/\\\\\|\\`\|\n/ end=/`\|$/ |
136 \ contains=typescriptTemplateSubstitution,typescriptSpecial,@Spell | 149 \ contains=typescriptTemplateSubstitution,typescriptSpecial,@Spell |
137 \ nextgroup=@typescriptSymbols | 150 \ nextgroup=@typescriptSymbols |
138 \ skipwhite skipempty | 151 \ skipwhite skipempty |
139 | 152 |
140 "Array | 153 "Array |
141 syntax region typescriptArray matchgroup=typescriptBraces | 154 syntax region typescriptArray matchgroup=typescriptBraces |
142 \ start=/\[/ end=/]/ | 155 \ start=/\[/ end=/]/ |
143 \ contains=@typescriptValue,@typescriptComments | 156 \ contains=@typescriptValue,@typescriptComments,typescriptCastKeyword |
144 \ nextgroup=@typescriptSymbols,typescriptDotNotation | 157 \ nextgroup=@typescriptSymbols,typescriptDotNotation |
145 \ skipwhite skipempty fold | 158 \ skipwhite skipempty fold |
146 | 159 |
147 " Number | 160 " Number |
148 syntax match typescriptNumber /\<0[bB][01][01_]*\>/ nextgroup=@typescriptSymbols skipwhite skipempty | 161 syntax match typescriptNumber /\<0[bB][01][01_]*\>/ nextgroup=@typescriptSymbols skipwhite skipempty |
149 syntax match typescriptNumber /\<0[oO][0-7][0-7_]*\>/ nextgroup=@typescriptSymbols skipwhite skipempty | 162 syntax match typescriptNumber /\<0[oO][0-7][0-7_]*\>/ nextgroup=@typescriptSymbols skipwhite skipempty |
150 syntax match typescriptNumber /\<0[xX][0-9a-fA-F][0-9a-fA-F_]*\>/ nextgroup=@typescriptSymbols skipwhite skipempty | 163 syntax match typescriptNumber /\<0[xX][0-9a-fA-F][0-9a-fA-F_]*\>/ nextgroup=@typescriptSymbols skipwhite skipempty |
151 syntax match typescriptNumber /\<\%(\d[0-9_]*\%(\.\d[0-9_]*\)\=\|\.\d[0-9_]*\)\%([eE][+-]\=\d[0-9_]*\)\=\>/ | 164 syntax match typescriptNumber /\<\%(\d[0-9_]*\%(\.\d[0-9_]*\)\=\|\.\d[0-9_]*\)\%([eE][+-]\=\d[0-9_]*\)\=\>/ |
152 \ nextgroup=typescriptSymbols skipwhite skipempty | 165 \ nextgroup=@typescriptSymbols skipwhite skipempty |
153 | 166 |
154 syntax region typescriptObjectLiteral matchgroup=typescriptBraces | 167 syntax region typescriptObjectLiteral matchgroup=typescriptBraces |
155 \ start=/{/ end=/}/ | 168 \ start=/{/ end=/}/ |
156 \ contains=@typescriptComments,typescriptObjectLabel,typescriptStringProperty,typescriptComputedPropertyName,typescriptObjectAsyncKeyword | 169 \ contains=@typescriptComments,typescriptObjectLabel,typescriptStringProperty,typescriptComputedPropertyName,typescriptObjectAsyncKeyword,typescriptTernary,typescriptCastKeyword |
157 \ fold contained | 170 \ fold contained |
158 | 171 |
159 syntax keyword typescriptObjectAsyncKeyword async contained | 172 syntax keyword typescriptObjectAsyncKeyword async contained |
160 | 173 |
161 syntax match typescriptObjectLabel contained /\k\+\_s*/ | 174 syntax match typescriptObjectLabel contained /\k\+\_s*/ |
221 " 2: **, **= | 234 " 2: **, **= |
222 syntax match typescriptBinaryOp contained /\*\*=\?/ nextgroup=@typescriptValue | 235 syntax match typescriptBinaryOp contained /\*\*=\?/ nextgroup=@typescriptValue |
223 | 236 |
224 syntax cluster typescriptSymbols contains=typescriptBinaryOp,typescriptKeywordOp,typescriptTernary,typescriptAssign,typescriptCastKeyword | 237 syntax cluster typescriptSymbols contains=typescriptBinaryOp,typescriptKeywordOp,typescriptTernary,typescriptAssign,typescriptCastKeyword |
225 | 238 |
226 " runtime syntax/basic/reserved.vim | 239 " runtime syntax/ts-common/reserved.vim |
227 "Import | 240 "Import |
228 syntax keyword typescriptImport from as | 241 syntax keyword typescriptImport from as |
229 syntax keyword typescriptImport import | 242 syntax keyword typescriptImport import |
230 \ nextgroup=typescriptImportType | 243 \ nextgroup=typescriptImportType,typescriptTypeBlock,typescriptDefaultImportName |
231 \ skipwhite | 244 \ skipwhite |
232 syntax keyword typescriptImportType type | 245 syntax keyword typescriptImportType type |
233 \ contained | 246 \ contained |
234 syntax keyword typescriptExport export | 247 syntax keyword typescriptExport export |
235 \ nextgroup=typescriptExportType | 248 \ nextgroup=typescriptExportType |
236 \ skipwhite | 249 \ skipwhite |
237 syntax match typescriptExportType /\<type\s*{\@=/ | 250 syntax match typescriptExportType /\<type\s*{\@=/ |
238 \ contained skipwhite skipempty skipnl | 251 \ contained skipwhite skipempty skipnl |
239 syntax keyword typescriptModule namespace module | 252 syntax keyword typescriptModule namespace module |
240 | 253 |
241 "this | 254 |
242 | 255 syntax keyword typescriptCastKeyword as satisfies |
243 "JavaScript Prototype | |
244 syntax keyword typescriptPrototype prototype | |
245 \ nextgroup=@afterIdentifier | |
246 | |
247 syntax keyword typescriptCastKeyword as | |
248 \ nextgroup=@typescriptType | 256 \ nextgroup=@typescriptType |
249 \ skipwhite | 257 \ skipwhite |
250 | 258 |
251 "Program Keywords | |
252 syntax keyword typescriptIdentifier arguments this super | |
253 \ nextgroup=@afterIdentifier | |
254 | |
255 syntax keyword typescriptVariable let var | 259 syntax keyword typescriptVariable let var |
256 \ nextgroup=@typescriptVariableDeclarations | 260 \ nextgroup=@typescriptVariableDeclarations |
257 \ skipwhite skipempty | 261 \ skipwhite skipempty |
258 | 262 |
259 syntax keyword typescriptVariable const | 263 syntax keyword typescriptVariable const |
260 \ nextgroup=typescriptEnum,@typescriptVariableDeclarations | 264 \ nextgroup=typescriptEnum,@typescriptVariableDeclarations |
265 \ skipwhite skipempty | |
266 | |
267 syntax keyword typescriptUsing using | |
268 \ nextgroup=@typescriptVariableDeclarations | |
261 \ skipwhite skipempty | 269 \ skipwhite skipempty |
262 | 270 |
263 syntax region typescriptEnum matchgroup=typescriptEnumKeyword start=/enum / end=/\ze{/ | 271 syntax region typescriptEnum matchgroup=typescriptEnumKeyword start=/enum / end=/\ze{/ |
264 \ nextgroup=typescriptBlock | 272 \ nextgroup=typescriptBlock |
265 \ skipwhite | 273 \ skipwhite |
270 \ nextgroup=@typescriptValue | 278 \ nextgroup=@typescriptValue |
271 \ skipwhite skipempty | 279 \ skipwhite skipempty |
272 | 280 |
273 syntax keyword typescriptForOperator contained in of | 281 syntax keyword typescriptForOperator contained in of |
274 syntax keyword typescriptBoolean true false nextgroup=@typescriptSymbols skipwhite skipempty | 282 syntax keyword typescriptBoolean true false nextgroup=@typescriptSymbols skipwhite skipempty |
275 syntax keyword typescriptNull null undefined nextgroup=@typescriptSymbols skipwhite skipempty | |
276 syntax keyword typescriptMessage alert confirm prompt status | 283 syntax keyword typescriptMessage alert confirm prompt status |
277 \ nextgroup=typescriptDotNotation,typescriptFuncCallArg | 284 \ nextgroup=typescriptDotNotation,typescriptFuncCallArg |
278 syntax keyword typescriptGlobal self top parent | 285 syntax keyword typescriptGlobal self top parent |
279 \ nextgroup=@afterIdentifier | 286 \ nextgroup=@afterIdentifier |
280 | 287 |
288 syntax keyword typescriptBranch break continue containedin=typescriptBlock | 295 syntax keyword typescriptBranch break continue containedin=typescriptBlock |
289 syntax keyword typescriptCase case nextgroup=@typescriptPrimitive skipwhite containedin=typescriptBlock | 296 syntax keyword typescriptCase case nextgroup=@typescriptPrimitive skipwhite containedin=typescriptBlock |
290 syntax keyword typescriptDefault default containedin=typescriptBlock nextgroup=@typescriptValue,typescriptClassKeyword,typescriptInterfaceKeyword skipwhite oneline | 297 syntax keyword typescriptDefault default containedin=typescriptBlock nextgroup=@typescriptValue,typescriptClassKeyword,typescriptInterfaceKeyword skipwhite oneline |
291 syntax keyword typescriptStatementKeyword with | 298 syntax keyword typescriptStatementKeyword with |
292 syntax keyword typescriptStatementKeyword yield skipwhite nextgroup=@typescriptValue containedin=typescriptBlock | 299 syntax keyword typescriptStatementKeyword yield skipwhite nextgroup=@typescriptValue containedin=typescriptBlock |
293 syntax keyword typescriptStatementKeyword return skipwhite contained nextgroup=@typescriptValue containedin=typescriptBlock | |
294 | 300 |
295 syntax keyword typescriptTry try | 301 syntax keyword typescriptTry try |
296 syntax keyword typescriptExceptions catch throw finally | 302 syntax keyword typescriptExceptions throw finally |
303 syntax keyword typescriptExceptions catch nextgroup=typescriptCall skipwhite skipempty oneline | |
297 syntax keyword typescriptDebugger debugger | 304 syntax keyword typescriptDebugger debugger |
298 | 305 |
299 syntax keyword typescriptAsyncFor await nextgroup=typescriptLoopParen skipwhite skipempty contained | 306 syntax keyword typescriptAsyncFor await nextgroup=typescriptLoopParen skipwhite skipempty contained |
300 | 307 |
301 syntax region typescriptLoopParen contained matchgroup=typescriptParens | 308 syntax region typescriptLoopParen contained matchgroup=typescriptParens |
318 \ typescriptFuncKeyword, | 325 \ typescriptFuncKeyword, |
319 \ typescriptClassKeyword, | 326 \ typescriptClassKeyword, |
320 \ typescriptAbstract, | 327 \ typescriptAbstract, |
321 \ typescriptEnumKeyword,typescriptEnum, | 328 \ typescriptEnumKeyword,typescriptEnum, |
322 \ typescriptModule | 329 \ typescriptModule |
330 | |
331 syntax keyword typescriptIdentifier arguments nextgroup=@afterIdentifier | |
332 syntax match typescriptDefaultImportName /\v\h\k*( |,)/ | |
333 \ contained | |
334 \ nextgroup=typescriptTypeBlock | |
335 \ skipwhite skipempty | |
336 | |
337 syntax region typescriptTypeBlock | |
338 \ matchgroup=typescriptBraces | |
339 \ start=/{/ end=/}/ | |
340 \ contained | |
341 \ contains=typescriptIdentifierName,typescriptImportType | |
342 \ fold | |
343 | |
344 "Program Keywords | |
345 syntax keyword typescriptNull null undefined nextgroup=@typescriptSymbols skipwhite skipempty | |
346 syntax keyword typescriptIdentifier this super prototype nextgroup=@afterIdentifier | |
347 syntax keyword typescriptStatementKeyword return skipwhite contained nextgroup=@typescriptValue containedin=typescriptBlock | |
323 | 348 |
324 "Syntax coloring for Node.js shebang line | 349 "Syntax coloring for Node.js shebang line |
325 syntax match shellbang "^#!.*node\>" | 350 syntax match shellbang "^#!.*node\>" |
326 syntax match shellbang "^#!.*iojs\>" | 351 syntax match shellbang "^#!.*iojs\>" |
327 | 352 |
534 \ nextgroup=typescriptFuncType | 559 \ nextgroup=typescriptFuncType |
535 \ containedin=typescriptFunctionType | 560 \ containedin=typescriptFunctionType |
536 \ contained skipwhite skipnl | 561 \ contained skipwhite skipnl |
537 | 562 |
538 syntax region typescriptFuncType matchgroup=typescriptParens | 563 syntax region typescriptFuncType matchgroup=typescriptParens |
539 \ start=/(/ end=/)\s*=>/me=e-2 | 564 \ start=/(\(\k\+:\|)\)\@=/ end=/)\s*=>/me=e-2 |
540 \ contains=@typescriptParameterList | 565 \ contains=@typescriptParameterList |
541 \ nextgroup=typescriptFuncTypeArrow | 566 \ nextgroup=typescriptFuncTypeArrow |
542 \ contained skipwhite skipnl oneline | 567 \ contained skipwhite skipnl oneline |
543 | 568 |
544 syntax match typescriptFuncTypeArrow /=>/ | 569 syntax match typescriptFuncTypeArrow /=>/ |
545 \ nextgroup=@typescriptType | 570 \ nextgroup=@typescriptType |
546 \ containedin=typescriptFuncType | 571 \ containedin=typescriptFuncType |
547 \ contained skipwhite skipnl | 572 \ contained skipwhite skipnl |
548 | |
549 | 573 |
550 syntax keyword typescriptConstructorType new | 574 syntax keyword typescriptConstructorType new |
551 \ nextgroup=@typescriptFunctionType | 575 \ nextgroup=@typescriptFunctionType |
552 \ contained skipwhite skipnl | 576 \ contained skipwhite skipnl |
553 | 577 |
621 \ nextgroup=@typescriptPrimaryType | 645 \ nextgroup=@typescriptPrimaryType |
622 \ skipwhite | 646 \ skipwhite |
623 | 647 |
624 | 648 |
625 " extension | 649 " extension |
626 if get(g:, 'yats_host_keyword', 1) | 650 if get(g:, 'typescript_host_keyword', 1) |
627 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Function Boolean | 651 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Function Boolean nextgroup=typescriptFuncCallArg |
628 " use of nextgroup Suggested by Doug Kearns | |
629 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Error EvalError nextgroup=typescriptFuncCallArg | 652 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Error EvalError nextgroup=typescriptFuncCallArg |
630 syntax keyword typescriptGlobal containedin=typescriptIdentifierName InternalError | 653 syntax keyword typescriptGlobal containedin=typescriptIdentifierName InternalError nextgroup=typescriptFuncCallArg |
631 syntax keyword typescriptGlobal containedin=typescriptIdentifierName RangeError ReferenceError | 654 syntax keyword typescriptGlobal containedin=typescriptIdentifierName RangeError ReferenceError nextgroup=typescriptFuncCallArg |
632 syntax keyword typescriptGlobal containedin=typescriptIdentifierName StopIteration | 655 syntax keyword typescriptGlobal containedin=typescriptIdentifierName StopIteration nextgroup=typescriptFuncCallArg |
633 syntax keyword typescriptGlobal containedin=typescriptIdentifierName SyntaxError TypeError | 656 syntax keyword typescriptGlobal containedin=typescriptIdentifierName SyntaxError TypeError nextgroup=typescriptFuncCallArg |
634 syntax keyword typescriptGlobal containedin=typescriptIdentifierName URIError Date | 657 syntax keyword typescriptGlobal containedin=typescriptIdentifierName URIError Date nextgroup=typescriptFuncCallArg |
635 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Float32Array | 658 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Float32Array nextgroup=typescriptFuncCallArg |
636 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Float64Array | 659 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Float64Array nextgroup=typescriptFuncCallArg |
637 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Int16Array Int32Array | 660 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Int16Array Int32Array nextgroup=typescriptFuncCallArg |
638 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Int8Array Uint16Array | 661 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Int8Array Uint16Array nextgroup=typescriptFuncCallArg |
639 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Uint32Array Uint8Array | 662 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Uint32Array Uint8Array nextgroup=typescriptFuncCallArg |
640 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Uint8ClampedArray | 663 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Uint8ClampedArray nextgroup=typescriptFuncCallArg |
641 syntax keyword typescriptGlobal containedin=typescriptIdentifierName ParallelArray | 664 syntax keyword typescriptGlobal containedin=typescriptIdentifierName ParallelArray nextgroup=typescriptFuncCallArg |
642 syntax keyword typescriptGlobal containedin=typescriptIdentifierName ArrayBuffer DataView | 665 syntax keyword typescriptGlobal containedin=typescriptIdentifierName ArrayBuffer DataView nextgroup=typescriptFuncCallArg |
643 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Iterator Generator | 666 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Iterator Generator nextgroup=typescriptFuncCallArg |
644 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Reflect Proxy | 667 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Reflect Proxy nextgroup=typescriptFuncCallArg |
645 syntax keyword typescriptGlobal containedin=typescriptIdentifierName arguments | 668 syntax keyword typescriptGlobal containedin=typescriptIdentifierName arguments |
646 hi def link typescriptGlobal Structure | 669 hi def link typescriptGlobal Structure |
647 syntax keyword typescriptGlobalMethod containedin=typescriptIdentifierName eval uneval nextgroup=typescriptFuncCallArg | 670 syntax keyword typescriptGlobalMethod containedin=typescriptIdentifierName eval uneval nextgroup=typescriptFuncCallArg |
648 syntax keyword typescriptGlobalMethod containedin=typescriptIdentifierName isFinite nextgroup=typescriptFuncCallArg | 671 syntax keyword typescriptGlobalMethod containedin=typescriptIdentifierName isFinite nextgroup=typescriptFuncCallArg |
649 syntax keyword typescriptGlobalMethod containedin=typescriptIdentifierName isNaN parseFloat nextgroup=typescriptFuncCallArg | 672 syntax keyword typescriptGlobalMethod containedin=typescriptIdentifierName isNaN parseFloat nextgroup=typescriptFuncCallArg |
673 syntax match typescriptGlobalStringDot /\./ contained nextgroup=typescriptStringStaticMethod,typescriptProp | 696 syntax match typescriptGlobalStringDot /\./ contained nextgroup=typescriptStringStaticMethod,typescriptProp |
674 syntax keyword typescriptStringStaticMethod contained fromCharCode fromCodePoint raw nextgroup=typescriptFuncCallArg | 697 syntax keyword typescriptStringStaticMethod contained fromCharCode fromCodePoint raw nextgroup=typescriptFuncCallArg |
675 hi def link typescriptStringStaticMethod Keyword | 698 hi def link typescriptStringStaticMethod Keyword |
676 syntax keyword typescriptStringMethod contained anchor charAt charCodeAt codePointAt nextgroup=typescriptFuncCallArg | 699 syntax keyword typescriptStringMethod contained anchor charAt charCodeAt codePointAt nextgroup=typescriptFuncCallArg |
677 syntax keyword typescriptStringMethod contained concat endsWith includes indexOf lastIndexOf nextgroup=typescriptFuncCallArg | 700 syntax keyword typescriptStringMethod contained concat endsWith includes indexOf lastIndexOf nextgroup=typescriptFuncCallArg |
678 syntax keyword typescriptStringMethod contained link localeCompare match normalize nextgroup=typescriptFuncCallArg | 701 syntax keyword typescriptStringMethod contained link localeCompare match matchAll normalize nextgroup=typescriptFuncCallArg |
679 syntax keyword typescriptStringMethod contained padStart padEnd repeat replace search nextgroup=typescriptFuncCallArg | 702 syntax keyword typescriptStringMethod contained padStart padEnd repeat replace replaceAll search nextgroup=typescriptFuncCallArg |
680 syntax keyword typescriptStringMethod contained slice split startsWith substr substring nextgroup=typescriptFuncCallArg | 703 syntax keyword typescriptStringMethod contained slice split startsWith substr substring nextgroup=typescriptFuncCallArg |
681 syntax keyword typescriptStringMethod contained toLocaleLowerCase toLocaleUpperCase nextgroup=typescriptFuncCallArg | 704 syntax keyword typescriptStringMethod contained toLocaleLowerCase toLocaleUpperCase nextgroup=typescriptFuncCallArg |
682 syntax keyword typescriptStringMethod contained toLowerCase toString toUpperCase trim nextgroup=typescriptFuncCallArg | 705 syntax keyword typescriptStringMethod contained toLowerCase toString toUpperCase trim nextgroup=typescriptFuncCallArg |
683 syntax keyword typescriptStringMethod contained valueOf nextgroup=typescriptFuncCallArg | 706 syntax keyword typescriptStringMethod contained trimEnd trimStart valueOf nextgroup=typescriptFuncCallArg |
684 syntax cluster props add=typescriptStringMethod | 707 syntax cluster props add=typescriptStringMethod |
685 hi def link typescriptStringMethod Keyword | 708 hi def link typescriptStringMethod Keyword |
686 | 709 |
687 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Array nextgroup=typescriptGlobalArrayDot,typescriptFuncCallArg | 710 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Array nextgroup=typescriptGlobalArrayDot,typescriptFuncCallArg |
688 syntax match typescriptGlobalArrayDot /\./ contained nextgroup=typescriptArrayStaticMethod,typescriptProp | 711 syntax match typescriptGlobalArrayDot /\./ contained nextgroup=typescriptArrayStaticMethod,typescriptProp |
689 syntax keyword typescriptArrayStaticMethod contained from isArray of nextgroup=typescriptFuncCallArg | 712 syntax keyword typescriptArrayStaticMethod contained from isArray of nextgroup=typescriptFuncCallArg |
690 hi def link typescriptArrayStaticMethod Keyword | 713 hi def link typescriptArrayStaticMethod Keyword |
691 syntax keyword typescriptArrayMethod contained concat copyWithin entries every fill nextgroup=typescriptFuncCallArg | 714 syntax keyword typescriptArrayMethod contained concat copyWithin entries every fill nextgroup=typescriptFuncCallArg |
692 syntax keyword typescriptArrayMethod contained filter find findIndex forEach indexOf nextgroup=typescriptFuncCallArg | 715 syntax keyword typescriptArrayMethod contained filter find findIndex flat flatMap forEach nextgroup=typescriptFuncCallArg |
693 syntax keyword typescriptArrayMethod contained includes join keys lastIndexOf map nextgroup=typescriptFuncCallArg | 716 syntax keyword typescriptArrayMethod contained includes indexOf join keys lastIndexOf map nextgroup=typescriptFuncCallArg |
694 syntax keyword typescriptArrayMethod contained pop push reduce reduceRight reverse nextgroup=typescriptFuncCallArg | 717 syntax keyword typescriptArrayMethod contained pop push reduce reduceRight reverse nextgroup=typescriptFuncCallArg |
695 syntax keyword typescriptArrayMethod contained shift slice some sort splice toLocaleString nextgroup=typescriptFuncCallArg | 718 syntax keyword typescriptArrayMethod contained shift slice some sort splice toLocaleString nextgroup=typescriptFuncCallArg |
696 syntax keyword typescriptArrayMethod contained toSource toString unshift nextgroup=typescriptFuncCallArg | 719 syntax keyword typescriptArrayMethod contained toSource toString unshift values nextgroup=typescriptFuncCallArg |
697 syntax cluster props add=typescriptArrayMethod | 720 syntax cluster props add=typescriptArrayMethod |
698 hi def link typescriptArrayMethod Keyword | 721 hi def link typescriptArrayMethod Keyword |
699 | 722 |
700 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Object nextgroup=typescriptGlobalObjectDot,typescriptFuncCallArg | 723 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Object nextgroup=typescriptGlobalObjectDot,typescriptFuncCallArg |
701 syntax match typescriptGlobalObjectDot /\./ contained nextgroup=typescriptObjectStaticMethod,typescriptProp | 724 syntax match typescriptGlobalObjectDot /\./ contained nextgroup=typescriptObjectStaticMethod,typescriptProp |
702 syntax keyword typescriptObjectStaticMethod contained create defineProperties defineProperty nextgroup=typescriptFuncCallArg | 725 syntax keyword typescriptObjectStaticMethod contained create defineProperties defineProperty nextgroup=typescriptFuncCallArg |
703 syntax keyword typescriptObjectStaticMethod contained entries freeze getOwnPropertyDescriptors nextgroup=typescriptFuncCallArg | 726 syntax keyword typescriptObjectStaticMethod contained entries freeze fromEntries getOwnPropertyDescriptors nextgroup=typescriptFuncCallArg |
704 syntax keyword typescriptObjectStaticMethod contained getOwnPropertyDescriptor getOwnPropertyNames nextgroup=typescriptFuncCallArg | 727 syntax keyword typescriptObjectStaticMethod contained getOwnPropertyDescriptor getOwnPropertyNames nextgroup=typescriptFuncCallArg |
705 syntax keyword typescriptObjectStaticMethod contained getOwnPropertySymbols getPrototypeOf nextgroup=typescriptFuncCallArg | 728 syntax keyword typescriptObjectStaticMethod contained getOwnPropertySymbols getPrototypeOf nextgroup=typescriptFuncCallArg |
706 syntax keyword typescriptObjectStaticMethod contained is isExtensible isFrozen isSealed nextgroup=typescriptFuncCallArg | 729 syntax keyword typescriptObjectStaticMethod contained is isExtensible isFrozen isSealed nextgroup=typescriptFuncCallArg |
707 syntax keyword typescriptObjectStaticMethod contained keys preventExtensions values nextgroup=typescriptFuncCallArg | 730 syntax keyword typescriptObjectStaticMethod contained keys preventExtensions values nextgroup=typescriptFuncCallArg |
708 hi def link typescriptObjectStaticMethod Keyword | 731 hi def link typescriptObjectStaticMethod Keyword |
713 syntax cluster props add=typescriptObjectMethod | 736 syntax cluster props add=typescriptObjectMethod |
714 hi def link typescriptObjectMethod Keyword | 737 hi def link typescriptObjectMethod Keyword |
715 | 738 |
716 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Symbol nextgroup=typescriptGlobalSymbolDot,typescriptFuncCallArg | 739 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Symbol nextgroup=typescriptGlobalSymbolDot,typescriptFuncCallArg |
717 syntax match typescriptGlobalSymbolDot /\./ contained nextgroup=typescriptSymbolStaticProp,typescriptSymbolStaticMethod,typescriptProp | 740 syntax match typescriptGlobalSymbolDot /\./ contained nextgroup=typescriptSymbolStaticProp,typescriptSymbolStaticMethod,typescriptProp |
718 syntax keyword typescriptSymbolStaticProp contained length iterator match replace | 741 syntax keyword typescriptSymbolStaticProp contained description length iterator match matchAll replace |
719 syntax keyword typescriptSymbolStaticProp contained search split hasInstance isConcatSpreadable | 742 syntax keyword typescriptSymbolStaticProp contained search split hasInstance isConcatSpreadable |
720 syntax keyword typescriptSymbolStaticProp contained unscopables species toPrimitive | 743 syntax keyword typescriptSymbolStaticProp contained unscopables species toPrimitive |
721 syntax keyword typescriptSymbolStaticProp contained toStringTag | 744 syntax keyword typescriptSymbolStaticProp contained toStringTag |
722 hi def link typescriptSymbolStaticProp Keyword | 745 hi def link typescriptSymbolStaticProp Keyword |
723 syntax keyword typescriptSymbolStaticMethod contained for keyFor nextgroup=typescriptFuncCallArg | 746 syntax keyword typescriptSymbolStaticMethod contained for keyFor nextgroup=typescriptFuncCallArg |
769 | 792 |
770 syntax keyword typescriptGlobal containedin=typescriptIdentifierName RegExp nextgroup=typescriptGlobalRegExpDot,typescriptFuncCallArg | 793 syntax keyword typescriptGlobal containedin=typescriptIdentifierName RegExp nextgroup=typescriptGlobalRegExpDot,typescriptFuncCallArg |
771 syntax match typescriptGlobalRegExpDot /\./ contained nextgroup=typescriptRegExpStaticProp,typescriptProp | 794 syntax match typescriptGlobalRegExpDot /\./ contained nextgroup=typescriptRegExpStaticProp,typescriptProp |
772 syntax keyword typescriptRegExpStaticProp contained lastIndex | 795 syntax keyword typescriptRegExpStaticProp contained lastIndex |
773 hi def link typescriptRegExpStaticProp Keyword | 796 hi def link typescriptRegExpStaticProp Keyword |
774 syntax keyword typescriptRegExpProp contained global ignoreCase multiline source sticky | 797 syntax keyword typescriptRegExpProp contained dotAll global ignoreCase multiline source sticky |
775 syntax cluster props add=typescriptRegExpProp | 798 syntax cluster props add=typescriptRegExpProp |
776 hi def link typescriptRegExpProp Keyword | 799 hi def link typescriptRegExpProp Keyword |
777 syntax keyword typescriptRegExpMethod contained exec test nextgroup=typescriptFuncCallArg | 800 syntax keyword typescriptRegExpMethod contained exec test nextgroup=typescriptFuncCallArg |
778 syntax cluster props add=typescriptRegExpMethod | 801 syntax cluster props add=typescriptRegExpMethod |
779 hi def link typescriptRegExpMethod Keyword | 802 hi def link typescriptRegExpMethod Keyword |
803 syntax keyword typescriptProxyAPI contained iterate ownKeys apply construct | 826 syntax keyword typescriptProxyAPI contained iterate ownKeys apply construct |
804 hi def link typescriptProxyAPI Keyword | 827 hi def link typescriptProxyAPI Keyword |
805 | 828 |
806 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Promise nextgroup=typescriptGlobalPromiseDot,typescriptFuncCallArg | 829 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Promise nextgroup=typescriptGlobalPromiseDot,typescriptFuncCallArg |
807 syntax match typescriptGlobalPromiseDot /\./ contained nextgroup=typescriptPromiseStaticMethod,typescriptProp | 830 syntax match typescriptGlobalPromiseDot /\./ contained nextgroup=typescriptPromiseStaticMethod,typescriptProp |
808 syntax keyword typescriptPromiseStaticMethod contained resolve reject all race nextgroup=typescriptFuncCallArg | 831 syntax keyword typescriptPromiseStaticMethod contained all allSettled any race reject resolve nextgroup=typescriptFuncCallArg |
809 hi def link typescriptPromiseStaticMethod Keyword | 832 hi def link typescriptPromiseStaticMethod Keyword |
810 syntax keyword typescriptPromiseMethod contained then catch finally nextgroup=typescriptFuncCallArg | 833 syntax keyword typescriptPromiseMethod contained then catch finally nextgroup=typescriptFuncCallArg |
811 syntax cluster props add=typescriptPromiseMethod | 834 syntax cluster props add=typescriptPromiseMethod |
812 hi def link typescriptPromiseMethod Keyword | 835 hi def link typescriptPromiseMethod Keyword |
813 | 836 |
1230 hi def link typescriptBOMHistoryProp Keyword | 1253 hi def link typescriptBOMHistoryProp Keyword |
1231 syntax keyword typescriptBOMHistoryMethod contained back forward go pushState replaceState nextgroup=typescriptFuncCallArg | 1254 syntax keyword typescriptBOMHistoryMethod contained back forward go pushState replaceState nextgroup=typescriptFuncCallArg |
1232 syntax cluster props add=typescriptBOMHistoryMethod | 1255 syntax cluster props add=typescriptBOMHistoryMethod |
1233 hi def link typescriptBOMHistoryMethod Keyword | 1256 hi def link typescriptBOMHistoryMethod Keyword |
1234 | 1257 |
1235 syntax keyword typescriptGlobal containedin=typescriptIdentifierName console | 1258 syntax keyword typescriptGlobal containedin=typescriptIdentifierName console nextgroup=typescriptGlobalConsoleDot |
1259 syntax match typescriptGlobalConsoleDot /\./ contained nextgroup=typescriptConsoleMethod,typescriptProp | |
1236 syntax keyword typescriptConsoleMethod contained count dir error group groupCollapsed nextgroup=typescriptFuncCallArg | 1260 syntax keyword typescriptConsoleMethod contained count dir error group groupCollapsed nextgroup=typescriptFuncCallArg |
1237 syntax keyword typescriptConsoleMethod contained groupEnd info log time timeEnd trace nextgroup=typescriptFuncCallArg | 1261 syntax keyword typescriptConsoleMethod contained groupEnd info log time timeEnd trace nextgroup=typescriptFuncCallArg |
1238 syntax keyword typescriptConsoleMethod contained warn nextgroup=typescriptFuncCallArg | 1262 syntax keyword typescriptConsoleMethod contained warn nextgroup=typescriptFuncCallArg |
1239 syntax cluster props add=typescriptConsoleMethod | 1263 syntax cluster props add=typescriptConsoleMethod |
1240 hi def link typescriptConsoleMethod Keyword | 1264 hi def link typescriptConsoleMethod Keyword |
1733 syntax cluster events add=typescriptUncategorizedEvent | 1757 syntax cluster events add=typescriptUncategorizedEvent |
1734 hi def link typescriptUncategorizedEvent Title | 1758 hi def link typescriptUncategorizedEvent Title |
1735 syntax keyword typescriptServiceWorkerEvent contained install activate fetch | 1759 syntax keyword typescriptServiceWorkerEvent contained install activate fetch |
1736 syntax cluster events add=typescriptServiceWorkerEvent | 1760 syntax cluster events add=typescriptServiceWorkerEvent |
1737 hi def link typescriptServiceWorkerEvent Title | 1761 hi def link typescriptServiceWorkerEvent Title |
1738 | |
1739 | |
1740 endif | 1762 endif |
1741 | 1763 |
1742 " patch | 1764 " patch |
1743 " patch for generated code | 1765 " patch for generated code |
1744 syntax keyword typescriptGlobal Promise | 1766 syntax keyword typescriptGlobal Promise |
1762 | 1784 |
1763 syntax cluster typescriptPropertyMemberDeclaration contains= | 1785 syntax cluster typescriptPropertyMemberDeclaration contains= |
1764 \ typescriptClassStatic, | 1786 \ typescriptClassStatic, |
1765 \ typescriptAccessibilityModifier, | 1787 \ typescriptAccessibilityModifier, |
1766 \ typescriptReadonlyModifier, | 1788 \ typescriptReadonlyModifier, |
1789 \ typescriptAutoAccessor, | |
1767 \ typescriptMethodAccessor, | 1790 \ typescriptMethodAccessor, |
1768 \ @typescriptMembers | 1791 \ @typescriptMembers |
1769 " \ typescriptMemberVariableDeclaration | 1792 " \ typescriptMemberVariableDeclaration |
1770 | 1793 |
1771 syntax match typescriptMemberOptionality /?\|!/ contained | 1794 syntax match typescriptMemberOptionality /?\|!/ contained |
1778 \ nextgroup=@typescriptMembers,typescriptAsyncFuncKeyword,typescriptReadonlyModifier | 1801 \ nextgroup=@typescriptMembers,typescriptAsyncFuncKeyword,typescriptReadonlyModifier |
1779 \ skipwhite contained | 1802 \ skipwhite contained |
1780 | 1803 |
1781 syntax keyword typescriptAccessibilityModifier public private protected contained | 1804 syntax keyword typescriptAccessibilityModifier public private protected contained |
1782 | 1805 |
1783 syntax keyword typescriptReadonlyModifier readonly contained | 1806 syntax keyword typescriptReadonlyModifier readonly override contained |
1807 | |
1808 syntax keyword typescriptAutoAccessor accessor contained | |
1784 | 1809 |
1785 syntax region typescriptStringMember contained | 1810 syntax region typescriptStringMember contained |
1786 \ start=/\z(["']\)/ skip=/\\\\\|\\\z1\|\\\n/ end=/\z1/ | 1811 \ start=/\z(["']\)/ skip=/\\\\\|\\\z1\|\\\n/ end=/\z1/ |
1787 \ nextgroup=@memberNextGroup | 1812 \ nextgroup=@memberNextGroup |
1788 \ skipwhite skipempty | 1813 \ skipwhite skipempty |
1789 | 1814 |
1790 syntax region typescriptComputedMember contained matchgroup=typescriptProperty | 1815 syntax region typescriptComputedMember contained matchgroup=typescriptProperty |
1791 \ start=/\[/rs=s+1 end=/]/ | 1816 \ start=/\[/rs=s+1 end=/]/ |
1792 \ contains=@typescriptValue,typescriptMember,typescriptMappedIn | 1817 \ contains=@typescriptValue,typescriptMember,typescriptMappedIn,typescriptCastKeyword |
1793 \ nextgroup=@memberNextGroup | 1818 \ nextgroup=@memberNextGroup |
1794 \ skipwhite skipempty | 1819 \ skipwhite skipempty |
1795 | 1820 |
1796 "don't add typescriptMembers to nextgroup, let outer scope match it | 1821 "don't add typescriptMembers to nextgroup, let outer scope match it |
1797 " so we won't match abstract method outside abstract class | 1822 " so we won't match abstract method outside abstract class |
1859 | 1884 |
1860 syntax match typescriptInterfaceComma /,/ contained nextgroup=typescriptInterfaceHeritage skipwhite skipnl | 1885 syntax match typescriptInterfaceComma /,/ contained nextgroup=typescriptInterfaceHeritage skipwhite skipnl |
1861 | 1886 |
1862 "Block VariableStatement EmptyStatement ExpressionStatement IfStatement IterationStatement ContinueStatement BreakStatement ReturnStatement WithStatement LabelledStatement SwitchStatement ThrowStatement TryStatement DebuggerStatement | 1887 "Block VariableStatement EmptyStatement ExpressionStatement IfStatement IterationStatement ContinueStatement BreakStatement ReturnStatement WithStatement LabelledStatement SwitchStatement ThrowStatement TryStatement DebuggerStatement |
1863 syntax cluster typescriptStatement | 1888 syntax cluster typescriptStatement |
1864 \ contains=typescriptBlock,typescriptVariable, | 1889 \ contains=typescriptBlock,typescriptVariable,typescriptUsing, |
1865 \ @typescriptTopExpression,typescriptAssign, | 1890 \ @typescriptTopExpression,typescriptAssign, |
1866 \ typescriptConditional,typescriptRepeat,typescriptBranch, | 1891 \ typescriptConditional,typescriptRepeat,typescriptBranch, |
1867 \ typescriptLabel,typescriptStatementKeyword, | 1892 \ typescriptLabel,typescriptStatementKeyword, |
1868 \ typescriptFuncKeyword, | 1893 \ typescriptFuncKeyword, |
1869 \ typescriptTry,typescriptExceptions,typescriptDebugger, | 1894 \ typescriptTry,typescriptExceptions,typescriptDebugger, |
1897 \ contains=@typescriptExpression,typescriptObjectLiteral | 1922 \ contains=@typescriptExpression,typescriptObjectLiteral |
1898 | 1923 |
1899 syntax cluster typescriptEventExpression contains=typescriptArrowFuncDef,typescriptParenExp,@typescriptValue,typescriptRegexpString,@typescriptEventTypes,typescriptOperator,typescriptGlobal,jsxRegion | 1924 syntax cluster typescriptEventExpression contains=typescriptArrowFuncDef,typescriptParenExp,@typescriptValue,typescriptRegexpString,@typescriptEventTypes,typescriptOperator,typescriptGlobal,jsxRegion |
1900 | 1925 |
1901 syntax keyword typescriptAsyncFuncKeyword async | 1926 syntax keyword typescriptAsyncFuncKeyword async |
1902 \ nextgroup=typescriptFuncKeyword,typescriptArrowFuncDef | 1927 \ nextgroup=typescriptFuncKeyword,typescriptArrowFuncDef,typescriptArrowFuncTypeParameter |
1903 \ skipwhite | 1928 \ skipwhite |
1904 | 1929 |
1905 syntax keyword typescriptAsyncFuncKeyword await | 1930 syntax keyword typescriptAsyncFuncKeyword await |
1906 \ nextgroup=@typescriptValue | 1931 \ nextgroup=@typescriptValue,typescriptUsing |
1907 \ skipwhite | 1932 \ skipwhite |
1908 | 1933 |
1909 syntax keyword typescriptFuncKeyword function | 1934 syntax keyword typescriptFuncKeyword function nextgroup=typescriptAsyncFunc,typescriptFuncName,@typescriptCallSignature skipwhite skipempty |
1910 \ nextgroup=typescriptAsyncFunc,typescriptFuncName,@typescriptCallSignature | |
1911 \ skipwhite skipempty | |
1912 | 1935 |
1913 syntax match typescriptAsyncFunc contained /*/ | 1936 syntax match typescriptAsyncFunc contained /*/ |
1914 \ nextgroup=typescriptFuncName,@typescriptCallSignature | 1937 \ nextgroup=typescriptFuncName,@typescriptCallSignature |
1915 \ skipwhite skipempty | 1938 \ skipwhite skipempty |
1916 | 1939 |
1917 syntax match typescriptFuncName contained /\K\k*/ | 1940 syntax match typescriptFuncName contained /\K\k*/ |
1918 \ nextgroup=@typescriptCallSignature | 1941 \ nextgroup=@typescriptCallSignature |
1919 \ skipwhite | 1942 \ skipwhite |
1920 | 1943 |
1921 " destructuring ({ a: ee }) => | |
1922 syntax match typescriptArrowFuncDef contained /(\(\s*\({\_[^}]*}\|\k\+\)\(:\_[^)]\)\?,\?\)\+)\s*=>/ | |
1923 \ contains=typescriptArrowFuncArg,typescriptArrowFunc | |
1924 \ nextgroup=@typescriptExpression,typescriptBlock | |
1925 \ skipwhite skipempty | |
1926 | |
1927 " matches `(a) =>` or `([a]) =>` or | |
1928 " `( | |
1929 " a) =>` | |
1930 syntax match typescriptArrowFuncDef contained /(\(\_s*[a-zA-Z\$_\[.]\_[^)]*\)*)\s*=>/ | |
1931 \ contains=typescriptArrowFuncArg,typescriptArrowFunc | |
1932 \ nextgroup=@typescriptExpression,typescriptBlock | |
1933 \ skipwhite skipempty | |
1934 | |
1935 syntax match typescriptArrowFuncDef contained /\K\k*\s*=>/ | 1944 syntax match typescriptArrowFuncDef contained /\K\k*\s*=>/ |
1936 \ contains=typescriptArrowFuncArg,typescriptArrowFunc | 1945 \ contains=typescriptArrowFuncArg,typescriptArrowFunc |
1937 \ nextgroup=@typescriptExpression,typescriptBlock | 1946 \ nextgroup=@typescriptExpression,typescriptBlock |
1938 \ skipwhite skipempty | 1947 \ skipwhite skipempty |
1939 | 1948 |
1940 " TODO: optimize this pattern | 1949 syntax match typescriptArrowFuncDef contained /(\%(\_[^()]\+\|(\_[^()]*)\)*)\_s*=>/ |
1941 syntax region typescriptArrowFuncDef contained start=/(\_[^(^)]*):/ end=/=>/ | 1950 \ contains=typescriptArrowFuncArg,typescriptArrowFunc,@typescriptCallSignature |
1942 \ contains=typescriptArrowFuncArg,typescriptArrowFunc,typescriptTypeAnnotation | 1951 \ nextgroup=@typescriptExpression,typescriptBlock |
1952 \ skipwhite skipempty | |
1953 | |
1954 syntax region typescriptArrowFuncDef contained start=/(\%(\_[^()]\+\|(\_[^()]*)\)*):/ matchgroup=typescriptArrowFunc end=/=>/ | |
1955 \ contains=typescriptArrowFuncArg,typescriptTypeAnnotation,@typescriptCallSignature | |
1943 \ nextgroup=@typescriptExpression,typescriptBlock | 1956 \ nextgroup=@typescriptExpression,typescriptBlock |
1944 \ skipwhite skipempty keepend | 1957 \ skipwhite skipempty keepend |
1945 | 1958 |
1959 syntax region typescriptArrowFuncTypeParameter start=/</ end=/>/ | |
1960 \ contains=@typescriptTypeParameterCluster | |
1961 \ nextgroup=typescriptArrowFuncDef | |
1962 \ contained skipwhite skipnl | |
1963 | |
1946 syntax match typescriptArrowFunc /=>/ | 1964 syntax match typescriptArrowFunc /=>/ |
1947 syntax match typescriptArrowFuncArg contained /\K\k*/ | 1965 syntax match typescriptArrowFuncArg contained /\K\k*/ |
1948 syntax region typescriptArrowFuncArg contained start=/<\|(/ end=/\ze=>/ contains=@typescriptCallSignature | |
1949 | 1966 |
1950 syntax region typescriptReturnAnnotation contained start=/:/ end=/{/me=e-1 contains=@typescriptType nextgroup=typescriptBlock | 1967 syntax region typescriptReturnAnnotation contained start=/:/ end=/{/me=e-1 contains=@typescriptType nextgroup=typescriptBlock |
1951 | 1968 |
1952 | 1969 |
1953 syntax region typescriptFuncImpl contained start=/function\>/ end=/{/me=e-1 | 1970 syntax region typescriptFuncImpl contained start=/function\>/ end=/{\|;\|\n/me=e-1 |
1954 \ contains=typescriptFuncKeyword | 1971 \ contains=typescriptFuncKeyword |
1955 \ nextgroup=typescriptBlock | 1972 \ nextgroup=typescriptBlock |
1956 | 1973 |
1957 syntax cluster typescriptCallImpl contains=typescriptGenericImpl,typescriptParamImpl | 1974 syntax cluster typescriptCallImpl contains=typescriptGenericImpl,typescriptParamImpl |
1958 syntax region typescriptGenericImpl matchgroup=typescriptTypeBrackets | 1975 syntax region typescriptGenericImpl matchgroup=typescriptTypeBrackets |
1968 | 1985 |
1969 syntax match typescriptDecorator /@\([_$a-zA-Z][_$a-zA-Z0-9]*\.\)*[_$a-zA-Z][_$a-zA-Z0-9]*\>/ | 1986 syntax match typescriptDecorator /@\([_$a-zA-Z][_$a-zA-Z0-9]*\.\)*[_$a-zA-Z][_$a-zA-Z0-9]*\>/ |
1970 \ nextgroup=typescriptFuncCallArg,typescriptTypeArguments | 1987 \ nextgroup=typescriptFuncCallArg,typescriptTypeArguments |
1971 \ contains=@_semantic,typescriptDotNotation | 1988 \ contains=@_semantic,typescriptDotNotation |
1972 | 1989 |
1973 " Define the default highlighting. | 1990 |
1974 hi def link typescriptReserved Error | 1991 hi def link typescriptReserved Error |
1975 | 1992 |
1976 hi def link typescriptEndColons Exception | 1993 hi def link typescriptEndColons Exception |
1977 hi def link typescriptSymbols Normal | 1994 hi def link typescriptSymbols Normal |
1978 hi def link typescriptBraces Function | 1995 hi def link typescriptBraces Function |
2011 hi def link typescriptCase Conditional | 2028 hi def link typescriptCase Conditional |
2012 hi def link typescriptDefault typescriptCase | 2029 hi def link typescriptDefault typescriptCase |
2013 hi def link typescriptBranch Conditional | 2030 hi def link typescriptBranch Conditional |
2014 hi def link typescriptIdentifier Structure | 2031 hi def link typescriptIdentifier Structure |
2015 hi def link typescriptVariable Identifier | 2032 hi def link typescriptVariable Identifier |
2033 hi def link typescriptUsing Identifier | |
2016 hi def link typescriptDestructureVariable PreProc | 2034 hi def link typescriptDestructureVariable PreProc |
2017 hi def link typescriptEnumKeyword Identifier | 2035 hi def link typescriptEnumKeyword Identifier |
2018 hi def link typescriptRepeat Repeat | 2036 hi def link typescriptRepeat Repeat |
2019 hi def link typescriptForOperator Repeat | 2037 hi def link typescriptForOperator Repeat |
2020 hi def link typescriptStatementKeyword Statement | 2038 hi def link typescriptStatementKeyword Statement |
2048 hi def link typescriptAsyncFor Keyword | 2066 hi def link typescriptAsyncFor Keyword |
2049 hi def link typescriptFuncKeyword Keyword | 2067 hi def link typescriptFuncKeyword Keyword |
2050 hi def link typescriptAsyncFunc Keyword | 2068 hi def link typescriptAsyncFunc Keyword |
2051 hi def link typescriptArrowFunc Type | 2069 hi def link typescriptArrowFunc Type |
2052 hi def link typescriptFuncName Function | 2070 hi def link typescriptFuncName Function |
2053 hi def link typescriptFuncArg PreProc | 2071 hi def link typescriptFuncCallArg PreProc |
2054 hi def link typescriptArrowFuncArg PreProc | 2072 hi def link typescriptArrowFuncArg PreProc |
2055 hi def link typescriptFuncComma Operator | 2073 hi def link typescriptFuncComma Operator |
2056 | 2074 |
2057 hi def link typescriptClassKeyword Keyword | 2075 hi def link typescriptClassKeyword Keyword |
2058 hi def link typescriptClassExtends Keyword | 2076 hi def link typescriptClassExtends Keyword |
2059 " hi def link typescriptClassName Function | |
2060 hi def link typescriptAbstract Special | 2077 hi def link typescriptAbstract Special |
2061 " hi def link typescriptClassHeritage Function | |
2062 " hi def link typescriptInterfaceHeritage Function | |
2063 hi def link typescriptClassStatic StorageClass | 2078 hi def link typescriptClassStatic StorageClass |
2064 hi def link typescriptReadonlyModifier Keyword | 2079 hi def link typescriptReadonlyModifier Keyword |
2065 hi def link typescriptInterfaceKeyword Keyword | 2080 hi def link typescriptInterfaceKeyword Keyword |
2066 hi def link typescriptInterfaceExtends Keyword | 2081 hi def link typescriptInterfaceExtends Keyword |
2067 hi def link typescriptInterfaceName Function | 2082 hi def link typescriptInterfaceName Function |
2075 hi def link typescriptUnion Operator | 2090 hi def link typescriptUnion Operator |
2076 hi def link typescriptFuncTypeArrow Function | 2091 hi def link typescriptFuncTypeArrow Function |
2077 hi def link typescriptConstructorType Function | 2092 hi def link typescriptConstructorType Function |
2078 hi def link typescriptTypeQuery Keyword | 2093 hi def link typescriptTypeQuery Keyword |
2079 hi def link typescriptAccessibilityModifier Keyword | 2094 hi def link typescriptAccessibilityModifier Keyword |
2095 hi def link typescriptAutoAccessor Keyword | |
2080 hi def link typescriptOptionalMark PreProc | 2096 hi def link typescriptOptionalMark PreProc |
2081 hi def link typescriptFuncType Special | 2097 hi def link typescriptFuncType Special |
2082 hi def link typescriptMappedIn Special | 2098 hi def link typescriptMappedIn Special |
2083 hi def link typescriptCall PreProc | 2099 hi def link typescriptCall PreProc |
2084 hi def link typescriptParamImpl PreProc | 2100 hi def link typescriptParamImpl PreProc |