|
146 | 146 | "name": "support.function.json.tm" |
147 | 147 | }, |
148 | 148 | { |
149 | | - "match": "[\\w-]+", |
| 149 | + "match": "[0-9A-Za-z_-]+", |
150 | 150 | "name": "string.json.tm" |
151 | 151 | }, |
152 | 152 | { |
|
409 | 409 | ] |
410 | 410 | }, |
411 | 411 | "injection-string": { |
412 | | - "comment": "All non-functional characters are treated as whitespace. This includes whitespace ` ` and asterisk `*`. [^\\w.,:|()-]", |
| 412 | + "comment": "https://github.com/microsoft/vscode-textmate/blob/main/src/matcher.ts", |
413 | 413 | "patterns": [ |
414 | 414 | { |
415 | | - "match": "(?>\\\\[\\\\\"/bfnrt])+", |
416 | | - "name": "comment.injection.whitespace.tm" |
| 415 | + "begin": "[LR]:|[0-9A-Za-z_.:]:(?![0-9A-Za-z_.:-])", |
| 416 | + "end": "(?=,|\")|$", |
| 417 | + "beginCaptures": { "0": { "name": "keyword.control.priority.tm" } }, |
| 418 | + "patterns": [ { "include": "#injection-string-inner" } ] |
417 | 419 | }, |
418 | | - { "include": "#escape-characters" }, |
419 | | - { |
420 | | - "begin": "[)|]", |
421 | | - "end": "(?=\")", |
422 | | - "name": "comment.injection.whitespace.tm" |
423 | | - }, |
424 | | - { |
425 | | - "match": "(?<=^\"|[^\\\\]\"|,)((?>\\\\[\\\\\"/bfnrt]|[^\\\\\"\\w.:|()-])*)([LR]:|[\\w.:]:(?![\\w.:-]))", |
426 | | - "captures": { |
427 | | - "1": { "name": "comment.injection.whitespace.tm" }, |
428 | | - "2": { "name": "support.function.tm" } |
429 | | - } |
430 | | - }, |
431 | | - { |
432 | | - "begin": "(?>text|source)(?=\\.[\\w.:])", |
433 | | - "end": "(?![\\w.:-])", |
434 | | - "beginCaptures": { "0": { "name": "support.function.tm" } }, |
435 | | - "name": "string", |
| 420 | + { "include": "#injection-string-inner" } |
| 421 | + ], |
| 422 | + "repository": { |
| 423 | + "injection-string-inner": { |
436 | 424 | "patterns": [ |
| 425 | + { "include": "#escape-characters" }, |
| 426 | + { |
| 427 | + "begin": "(?>text|source)(?=\\.[0-9A-Za-z_.:-])", |
| 428 | + "end": "(?![0-9A-Za-z_.:-])", |
| 429 | + "beginCaptures": { "0": { "name": "support.function.tm" } }, |
| 430 | + "name": "string.tm", |
| 431 | + "patterns": [ |
| 432 | + { |
| 433 | + "match": "\\.", |
| 434 | + "name": "support.function.tm" |
| 435 | + } |
| 436 | + ] |
| 437 | + }, |
| 438 | + { |
| 439 | + "match": "[0-9A-Za-z_.:][0-9A-Za-z_.:-]*", |
| 440 | + "captures": { "0": { "name": "$0" } }, |
| 441 | + "name": "string.tm" |
| 442 | + }, |
| 443 | + { |
| 444 | + "begin": "\\(", |
| 445 | + "end": "\\)|(?=\")|$", |
| 446 | + "captures": { "0": { "name": "constant.character.set.regexp.tm" } }, |
| 447 | + "patterns": [ |
| 448 | + { |
| 449 | + "match": "\\|", |
| 450 | + "name": "keyword.control.negate.tm" |
| 451 | + }, |
| 452 | + { "include": "#injection-string-inner" } |
| 453 | + ] |
| 454 | + }, |
| 455 | + { |
| 456 | + "match": ",", |
| 457 | + "name": "keyword.control.tm" |
| 458 | + }, |
437 | 459 | { |
438 | | - "match": "\\.", |
439 | | - "name": "support.function.tm" |
| 460 | + "comment": "Negates the following negation `-`, group `()` or series of scopes `foo bar abc`", |
| 461 | + "begin": "-", |
| 462 | + "end": "(?=[\",|)-])|(?!\\G)(?=\\()|(?<=\\))|$", |
| 463 | + "beginCaptures": { "0": { "name": "support.function.tm" } }, |
| 464 | + "patterns": [ |
| 465 | + { |
| 466 | + "begin": "\\G(?![\",|0-9A-Za-z_.:-])", |
| 467 | + "end": "(?=[\",|0-9A-Za-z_.:-])|(?<=\\))|$", |
| 468 | + "patterns": [ { "include": "#injection-string-inner-negated" } ] |
| 469 | + }, |
| 470 | + { "include": "#injection-string-inner-negated" } |
| 471 | + ] |
| 472 | + }, |
| 473 | + { |
| 474 | + "begin": "[)|]", |
| 475 | + "end": "(?=\")|$", |
| 476 | + "name": "comment.injection.whitespace.tm" |
| 477 | + }, |
| 478 | + { |
| 479 | + "comment": "All non-functional characters are treated as whitespace. This includes whitespace ` ` and asterisk `*`", |
| 480 | + "match": "[^\\\\\"0-9A-Za-z_.:,|()-]+", |
| 481 | + "name": "comment.injection.whitespace.tm" |
440 | 482 | } |
441 | 483 | ] |
442 | 484 | }, |
443 | | - { |
444 | | - "match": "[\\w.:][\\w.:-]*", |
445 | | - "name": "string $0" |
446 | | - }, |
447 | | - { |
448 | | - "begin": "\\(", |
449 | | - "end": "\\)|(?=\")", |
450 | | - "captures": { "0": { "name": "constant.character.set.regexp.tm" } }, |
| 485 | + "injection-string-inner-negated": { |
451 | 486 | "patterns": [ |
452 | 487 | { |
453 | | - "match": "(?<=[,|])(?>\\\\[\\\\\"/bfnrt]|[^\\\\\\w.:()-])+", |
454 | | - "name": "comment.injection.whitespace.tm" |
| 488 | + "begin": "(?>text|source)(?=\\.[0-9A-Za-z_.:-])", |
| 489 | + "end": "(?![0-9A-Za-z_.:-])", |
| 490 | + "beginCaptures": { "0": { "name": "support.function.tm" } }, |
| 491 | + "name": "string.tm emphasis.tm", |
| 492 | + "patterns": [ |
| 493 | + { |
| 494 | + "match": "\\.", |
| 495 | + "name": "support.function.tm" |
| 496 | + } |
| 497 | + ] |
455 | 498 | }, |
456 | 499 | { |
457 | | - "match": "\\|", |
458 | | - "name": "keyword.control.tm" |
| 500 | + "match": "[0-9A-Za-z_.:][0-9A-Za-z_.:-]*", |
| 501 | + "captures": { "0": { "name": "$0" } }, |
| 502 | + "name": "string.tm emphasis.tm" |
| 503 | + }, |
| 504 | + { |
| 505 | + "begin": "\\(", |
| 506 | + "end": "\\)|(?=\")|$", |
| 507 | + "captures": { "0": { "name": "constant.character.set.regexp.tm" } }, |
| 508 | + "patterns": [ |
| 509 | + { |
| 510 | + "match": "\\|", |
| 511 | + "name": "keyword.control.negate.tm" |
| 512 | + }, |
| 513 | + { "include": "#injection-string-inner-negated" } |
| 514 | + ] |
| 515 | + }, |
| 516 | + { |
| 517 | + "begin": "-", |
| 518 | + "end": "(?=[\",|)-])|(?!\\G)(?=\\()|(?<=\\))|$", |
| 519 | + "beginCaptures": { "0": { "name": "support.function.tm" } }, |
| 520 | + "patterns": [ |
| 521 | + { |
| 522 | + "begin": "\\G(?![\",|0-9A-Za-z_.:-])", |
| 523 | + "end": "(?=[\",|0-9A-Za-z_.:-])|(?<=\\))|$", |
| 524 | + "patterns": [ { "include": "#injection-string-inner" } ] |
| 525 | + }, |
| 526 | + { "include": "#injection-string-inner" } |
| 527 | + ] |
459 | 528 | }, |
460 | | - { "include": "#injection-string" } |
| 529 | + { "include": "#injection-string-inner" } |
461 | 530 | ] |
462 | | - }, |
463 | | - { |
464 | | - "match": "(?>\\\\[\\\\\"/bfnrt]|[^\\\\\"\\w.:,|()-])+", |
465 | | - "name": "comment.injection.whitespace.tm" |
466 | | - }, |
467 | | - { |
468 | | - "match": "(?<=,)(?>\\\\[\\\\\"/bfnrt]|[^\\\\\"\\w.:|()-])+", |
469 | | - "name": "comment.injection.whitespace.tm" |
470 | | - }, |
471 | | - { |
472 | | - "match": ",", |
473 | | - "name": "keyword.control.tm" |
474 | | - }, |
475 | | - { |
476 | | - "match": "-(?>\\\\[\\\\\"/bfnrt]|[^\\\\\"\\w.:|()-])*-", |
477 | | - "name": "comment.injection.whitespace.tm" |
478 | | - }, |
479 | | - { |
480 | | - "begin": "-", |
481 | | - "end": "(?=[\"\t\n,|()-])", |
482 | | - "beginCaptures": { "0": { "name": "support.function.tm" } }, |
483 | | - "name": "emphasis", |
484 | | - "patterns": [ { "include": "#injection-string" } ] |
485 | | - }, |
486 | | - { |
487 | | - "match": "-", |
488 | | - "name": "support.function.tm" |
489 | 531 | } |
490 | | - ] |
| 532 | + } |
491 | 533 | }, |
492 | 534 | "firstLineMatch": { |
493 | 535 | "comment": "\"firstLineMatch\": \"...\"", |
|
899 | 941 | { |
900 | 942 | "comment": "${0:/upcase} ${000999:/downcase}", |
901 | 943 | "match": "(\\${)(0*)([0-9]{1,3})(:/)(upcase|downcase)(})", |
902 | | - "name": "meta.embedded.replace.capture.json.tm", |
903 | 944 | "captures": { |
904 | 945 | "1": { "name": "constant.character.escape.json.tm" }, |
905 | 946 | "2": { "name": "punctuation.definition.tag.json.tm" }, |
906 | 947 | "3": { "name": "constant.numeric.json.tm" }, |
907 | 948 | "4": { "name": "constant.character.escape.json.tm" }, |
908 | 949 | "5": { "name": "markup.heading.json.tm" }, |
909 | 950 | "6": { "name": "constant.character.escape.json.tm" } |
910 | | - } |
| 951 | + }, |
| 952 | + "name": "meta.embedded.replace.capture.json.tm" |
911 | 953 | } |
912 | 954 | ] |
913 | 955 | }, |
|
1117 | 1159 | "applyEndPatternLast": { |
1118 | 1160 | "comment": "\"applyEndPatternLast\": true", |
1119 | 1161 | "begin": "(\")(applyEndPatternLast)(\")", |
1120 | | - "end": "(?<=\\w)|(?=[},])", |
| 1162 | + "end": "(?<=[0-9A-Za-z_])|(?=[},])", |
1121 | 1163 | "beginCaptures": { |
1122 | 1164 | "1": { "name": "punctuation.definition.string.begin.json.tm" }, |
1123 | 1165 | "2": { "name": "keyword.property-name.string.applyEndPatternLast.json.tm" }, |
|
1126 | 1168 | "patterns": [ |
1127 | 1169 | { |
1128 | 1170 | "begin": ":", |
1129 | | - "end": "(?<=\\w)|(?=[},])", |
| 1171 | + "end": "(?<=[0-9A-Za-z_])|(?=[},])", |
1130 | 1172 | "beginCaptures": { "0": { "name": "punctuation.separator.dictionary.key-value.json.tm" } }, |
1131 | 1173 | "patterns": [ |
1132 | 1174 | { |
|
1155 | 1197 | "patterns": [ |
1156 | 1198 | { |
1157 | 1199 | "begin": ":", |
1158 | | - "end": "(?<=\\w)|(?=[},])", |
| 1200 | + "end": "(?<=[0-9A-Za-z_])|(?=[},])", |
1159 | 1201 | "beginCaptures": { "0": { "name": "punctuation.separator.dictionary.key-value.json.tm" } }, |
1160 | 1202 | "patterns": [ { "include": "#json-value" } ] |
1161 | 1203 | }, |
|
1316 | 1358 | "name": "support.function.json.tm" |
1317 | 1359 | }, |
1318 | 1360 | { |
1319 | | - "match": "[\\w:][\\w:-]*+", |
| 1361 | + "match": "[0-9A-Za-z_:][0-9A-Za-z_:-]*+", |
1320 | 1362 | "name": "string" |
1321 | 1363 | }, |
1322 | 1364 | { |
|
0 commit comments