|
41 | 41 | '3': |
42 | 42 | 'name': 'entity.name.type.instance.jsdoc' |
43 | 43 | '4': |
44 | | - 'name': 'punctuation.definition.begin.jsdoc' |
| 44 | + 'name': 'punctuation.definition.bracket.angle.begin.jsdoc' |
45 | 45 | '5': |
46 | 46 | 'name': 'constant.other.email.link.underline.jsdoc' |
47 | 47 | '6': |
48 | | - 'name': 'punctuation.definition.end.jsdoc' |
| 48 | + 'name': 'punctuation.definition.bracket.angle.end.jsdoc' |
49 | 49 | } |
50 | 50 | { |
51 | 51 | # @borrows <that namepath> as <this namepath> |
52 | 52 | 'match': '''(?x) |
53 | 53 | ((@)borrows) \\s+ |
54 | | - ((?:[^@\\s*/]|\\*[^/])++) # <that namepath> |
55 | | - \\s++ (as) \\s++ # as |
56 | | - ((?:[^@\\s*/]|\\*[^/])++) # <this namepath> |
| 54 | + ((?:[^@\\s*/]|\\*[^/])+) # <that namepath> |
| 55 | + \\s++ (as) \\s+ # as |
| 56 | + ((?:[^@\\s*/]|\\*[^/])+) # <this namepath> |
57 | 57 | ''' |
58 | 58 | 'captures': |
59 | 59 | '1': |
|
150 | 150 | # URL |
151 | 151 | ( |
152 | 152 | (?=https?://) |
153 | | - (?:[^\\s*]|\\*[/])+ |
| 153 | + (?:[^\\s*]|\\*[^/])+ |
154 | 154 | ) |
155 | 155 | | |
156 | 156 | # JSDoc namepath |
157 | 157 | ( |
158 | 158 | (?!https?://) |
159 | | - (?:[^@\\s*/]|\\*[^/])++ |
| 159 | + (?:[^@\\s*/]|\\*[^/])+ |
160 | 160 | ) |
161 | 161 | ) |
162 | 162 | ''' |
|
170 | 170 | 'name': 'punctuation.definition.block.tag.jsdoc' |
171 | 171 | '3': |
172 | 172 | 'name': 'variable.other.jsdoc' |
| 173 | + 'patterns': [ |
| 174 | + { |
| 175 | + 'match': ',' |
| 176 | + 'name': 'punctuation.delimiter.object.comma.jsdoc' |
| 177 | + } |
| 178 | + ] |
173 | 179 | 'match': '''(?x) |
174 | 180 | ((@)template) |
175 | 181 | \\s+ |
|
232 | 238 | # - @<tag> {type} identifier |
233 | 239 | 'begin': '((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\\s+(?={)' |
234 | 240 | 'beginCaptures': |
235 | | - '1': 'name': 'storage.type.class.jsdoc' |
236 | | - '2': 'name': 'punctuation.definition.block.tag.jsdoc' |
| 241 | + '1': |
| 242 | + 'name': 'storage.type.class.jsdoc' |
| 243 | + '2': |
| 244 | + 'name': 'punctuation.definition.block.tag.jsdoc' |
237 | 245 | 'end': '(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])' |
238 | 246 | 'patterns': [ |
239 | 247 | { |
|
302 | 310 | { |
303 | 311 | # Tags followed by a quoted arbitrary value |
304 | 312 | # - @<tag> "Quoted value" |
305 | | - 'begin': '((@)(?:default(?:value)?|license|version))\\s+([\'"])' |
| 313 | + 'begin': '((@)(?:default(?:value)?|license|version))\\s+(([\'"]))' |
306 | 314 | 'beginCaptures': |
307 | 315 | '1': |
308 | 316 | 'name': 'storage.type.class.jsdoc' |
309 | 317 | '2': |
310 | 318 | 'name': 'punctuation.definition.block.tag.jsdoc' |
311 | 319 | '3': |
312 | 320 | 'name': 'variable.other.jsdoc' |
| 321 | + '4': |
| 322 | + 'name': 'punctuation.definition.string.begin.jsdoc' |
313 | 323 | 'contentName': 'variable.other.jsdoc' |
314 | | - 'end': '\\3|(?=$|\\*/)' |
| 324 | + 'end': '(\\3)|(?=$|\\*/)' |
315 | 325 | 'endCaptures': |
316 | 326 | '0': |
317 | 327 | 'name': 'variable.other.jsdoc' |
| 328 | + '1': |
| 329 | + 'name': 'punctuation.definition.string.end.jsdoc' |
318 | 330 | } |
319 | 331 | { |
320 | 332 | # Tags followed by an arbitrary value |
|
366 | 378 | 'name': 'constant.other.description.jsdoc' |
367 | 379 | } |
368 | 380 | { |
369 | | - # {@link|tutorial …} |
370 | | - 'begin': '({@)(?:link|linkcode|linkplain|tutorial)\\s*' |
| 381 | + # {@link|@tutorial …} |
| 382 | + 'begin': '({)((@)(?:link(?:code|plain)?|tutorial))\\s*' |
371 | 383 | 'beginCaptures': |
372 | | - '0': |
373 | | - 'name': 'storage.type.class.jsdoc' |
374 | 384 | '1': |
375 | | - 'name': 'punctuation.definition.inline.tag.begin.jsdoc' |
| 385 | + 'name': 'punctuation.definition.bracket.curly.begin.jsdoc' |
| 386 | + '2': |
| 387 | + 'name': 'storage.type.class.jsdoc' |
| 388 | + '3': |
| 389 | + 'name': 'punctuation.definition.inline.tag.jsdoc' |
376 | 390 | 'end': '}|(?=\\*/)' |
377 | 391 | 'endCaptures': |
378 | 392 | '0': |
379 | | - 'name': 'punctuation.definition.inline.tag.end.jsdoc' |
| 393 | + 'name': 'punctuation.definition.bracket.curly.end.jsdoc' |
380 | 394 | 'name': 'entity.name.type.instance.jsdoc' |
381 | 395 | 'patterns': [ |
382 | 396 | { |
|
400 | 414 | ] |
401 | 415 |
|
402 | 416 | 'repository': |
403 | | - |
404 | 417 | # Balanced brackets (square or curly) |
405 | 418 | 'brackets': |
406 | 419 | 'patterns': [ |
|
423 | 436 | ] |
424 | 437 | } |
425 | 438 | ] |
426 | | - |
427 | 439 | # Balanced quotes |
428 | 440 | 'quotes': |
429 | 441 | 'patterns': [ |
|
446 | 458 | ] |
447 | 459 | } |
448 | 460 | ] |
449 | | - |
450 | 461 | # {type} |
451 | 462 | 'type': |
452 | 463 | 'patterns': [ |
|
0 commit comments