|
97 | 97 | {
|
98 | 98 | 'include': '#char-literals'
|
99 | 99 | },
|
| 100 | + { |
| 101 | + 'include': '#template' |
| 102 | + }, |
100 | 103 | {
|
101 | 104 | 'include': '#function'
|
102 | 105 | },
|
|
155 | 158 | {
|
156 | 159 | 'include': '#char-literals'
|
157 | 160 | },
|
| 161 | +{ |
| 162 | + 'include': '#template' |
| 163 | +}, |
158 | 164 | {
|
159 | 165 | 'include': '#function'
|
160 | 166 | },
|
|
241 | 247 | 'name': 'invalid.deprecated.cpp'
|
242 | 248 |
|
243 | 249 | # storage types
|
244 |
| - # NOTE: class, struct, and union are highlighted in '#class' |
| 250 | + # NOTE: class, struct, and union are highlighted in '#class'; |
| 251 | + # template is highlighted in '#template' |
245 | 252 | 'storage-types':
|
246 |
| - 'match': '\\b(?:auto|bool|char|char16_t|char32_t|decltype|double|enum|float|int|long|short|signed|template|unsigned|void|wchar_t)\\b' |
| 253 | + 'match': '\\b(?:auto|bool|char|char16_t|char32_t|decltype|double|enum|float|int|long|short|signed|unsigned|void|wchar_t)\\b' |
247 | 254 | 'name': 'storage.type.cpp'
|
248 | 255 |
|
249 | 256 | # storage modifiers
|
|
463 | 470 | 'include': '#after-function'
|
464 | 471 | }]
|
465 | 472 | }]
|
| 473 | + |
| 474 | + # template |
| 475 | + 'template': |
| 476 | + 'begin': '\\btemplate\\b' |
| 477 | + 'beginCaptures': |
| 478 | + '0': |
| 479 | + 'name': 'storage.type.cpp' |
| 480 | + 'end': '(?=>)' |
| 481 | + 'patterns': [{ |
| 482 | + 'begin': '(?=<)' |
| 483 | + 'end': '(?=>)' |
| 484 | + 'patterns': [{ |
| 485 | + 'include': '#block-comment' |
| 486 | + }, |
| 487 | + { |
| 488 | + 'include': '#line-comment' |
| 489 | + }, |
| 490 | + { |
| 491 | + 'include': '#numeric-literals' |
| 492 | + }, |
| 493 | + { |
| 494 | + 'include': '#language-constants' |
| 495 | + }, |
| 496 | + { |
| 497 | + 'include': '#storage-types' |
| 498 | + }, |
| 499 | + { |
| 500 | + 'match': '\\bclass\\b' |
| 501 | + 'name': 'storage.type.cpp' |
| 502 | + }, |
| 503 | + { |
| 504 | + 'include': '#control-keywords' |
| 505 | + }, |
| 506 | + { |
| 507 | + 'include': '#operator-keywords' |
| 508 | + }, |
| 509 | + { |
| 510 | + 'include': '#cast-operator-keywords' |
| 511 | + }, |
| 512 | + { |
| 513 | + 'include': '#deprecated-keywords' |
| 514 | + }, |
| 515 | + { |
| 516 | + 'include': '#storage-modifiers' |
| 517 | + }, |
| 518 | + { |
| 519 | + 'include': '#support-types' |
| 520 | + }, |
| 521 | + { |
| 522 | + 'include': '#string' |
| 523 | + }, |
| 524 | + { |
| 525 | + 'include': '#raw-string' |
| 526 | + }, |
| 527 | + { |
| 528 | + 'include': '#char-literals' |
| 529 | + }, |
| 530 | + { |
| 531 | + 'include': '#function' |
| 532 | + }] |
| 533 | + }] |
0 commit comments