|
424 | 424 | }, |
425 | 425 | { |
426 | 426 | "comment": "(?y{g}-imxWDSP) (?y{w}imxWDSP-x: ...)", |
427 | | - "begin": "(?>(\\((?=[^:)]+:))|(\\())(\\?)(?=[-IimxWDSPy])(?=[^x:)]++[:)]|[^-:)]*+-[^x:)]*+x[^:)]*+[:)])", |
| 427 | + "begin": "(?=\\(\\?[-IimxWDSPy])(?>(\\((?=[^:)]++:))|(\\())(\\?)(?=[^x:)]++[:)]|[^-:)]*+-[^x:)]*+x[^:)]*+[:)])", |
428 | 428 | "end": "(?((?!\\1))\\)|(?=[\")]))(?#Condition is true only when Backreference \\1 from capture group 1 in \"begin\" is *not* empty.)|(?=\")", |
429 | 429 | "beginCaptures": { |
430 | 430 | "1": { "name": "constant.character.set.regexp.tm" }, |
|
451 | 451 | "capture-group-modify-extended": { |
452 | 452 | "patterns": [ |
453 | 453 | { |
454 | | - "match": "\\(\\?-+:?\\)", |
| 454 | + "match": "\\(\\?-++:?+\\)", |
455 | 455 | "name": "punctuation.definition.tag.tm" |
456 | 456 | }, |
457 | 457 | { |
458 | 458 | "comment": "(?y{g}imxWDSP-) (?y{w}x-imWDSP:...)", |
459 | | - "begin": "(?>(\\((?=[^:)]++:))|(\\())(\\?)(?=[-IimxWDSPy])(?=[^-:)]*+[^x:)]*+[:)])", |
| 459 | + "begin": "(?=\\(\\?[-IimxWDSPy])(?>(\\((?=[^:)]++:))|(\\())(\\?)(?=[^-:)]*+[^x:)]*+[:)])", |
460 | 460 | "end": "(?((?!\\1))\\)|(?=[\")]))(?#Condition is true only when Backreference \\1 from capture group 1 in \"begin\" is *not* empty.)|(?=\")", |
461 | 461 | "beginCaptures": { |
462 | 462 | "1": { "name": "constant.character.set.regexp.tm" }, |
|
670 | 670 | }, |
671 | 671 | "absent": { |
672 | 672 | "comment": "(?~|...|...) (?~|...) (?~...) (?~|)", |
673 | | - "begin": "(\\()(\\?~\\|?)", |
| 673 | + "begin": "(\\()(\\?~\\|?+)", |
674 | 674 | "end": "\\)|(?=\")", |
675 | 675 | "beginCaptures": { |
676 | 676 | "1": { "name": "constant.character.set.regexp.tm" }, |
|
788 | 788 | }, |
789 | 789 | { |
790 | 790 | "comment": "(*name[tag]{args...})", |
791 | | - "match": "(\\()(\\*)([A-Za-z_]\\w*)([^\\[{)]*)(?>(\\[)([^]]*)(]))?([^{)]*)(?>({)([^}]*)(}))?([^)]*)(\\))([+*?]|(?D){(?>\\d+,?\\d*|,\\d+)})?", |
| 791 | + "match": "(\\()(\\*)([A-Za-z_]\\w*+)([^\\[{)]*+)(?>(\\[)([^]]*+)(]))?+([^{)]*+)(?>({)([^}]*+)(}))?+([^)]*+)(\\))([+*?]|(?D){(?>\\d++,?+\\d*+|,\\d++)})?+", |
792 | 792 | "captures": { |
793 | 793 | "1": { "name": "constant.character.set.regexp.tm markup.italic" }, |
794 | 794 | "2": { "name": "support.function.tm" }, |
|
941 | 941 | } |
942 | 942 | }, |
943 | 943 | { |
944 | | - "match": "(\\*(-)\\+)(\\\\{2}(?=-))?", |
| 944 | + "match": "(\\*(-)\\+)(\\\\{2}(?=-))?+", |
945 | 945 | "captures": { |
946 | 946 | "1": { "name": "character-class-range.tm support.class.tm" }, |
947 | 947 | "2": { "name": "punctuation.definition.tag.tm strong" }, |
|
1231 | 1231 | "comment": "\\777 \\xFF \\cZ \\o{0 4777777} \\x{0 13FFFF} \\u0000 \\p{L} \\C-\\M-]", |
1232 | 1232 | "patterns": [ |
1233 | 1233 | { |
1234 | | - "match": "(\\\\{2})([Ppox])(\\\\{2})({)", |
| 1234 | + "comment": "The look-ahead increases performance. No clue why :shrug:", |
| 1235 | + "match": "(\\\\{2})([Ppox])(?=\\\\\\\\{)(\\\\{2})({)", |
1235 | 1236 | "captures": { |
1236 | 1237 | "1": { "name": "punctuation.definition.tag.tm" }, |
1237 | 1238 | "2": { "name": "entity.name.label.tm strong" }, |
|
1280 | 1281 | ] |
1281 | 1282 | }, |
1282 | 1283 | { |
1283 | | - "match": "(\\\\{2})([0-7]{1,3})", |
| 1284 | + "match": "(\\\\{2})([0-7]{3,1})", |
1284 | 1285 | "captures": { |
1285 | 1286 | "1": { "name": "punctuation.definition.list.begin.markdown.tm" }, |
1286 | 1287 | "2": { "name": "constant.numeric.tm" } |
1287 | 1288 | } |
1288 | 1289 | }, |
1289 | 1290 | { |
1290 | | - "match": "(\\\\{2}x)(?!{|\")(\\h{,2})", |
| 1291 | + "match": "(\\\\{2}x)(?!{|\")(\\h{2,0})", |
1291 | 1292 | "captures": { |
1292 | 1293 | "1": { "name": "punctuation.definition.list.begin.markdown.tm" }, |
1293 | 1294 | "2": { "name": "constant.numeric.tm" } |
1294 | 1295 | } |
1295 | 1296 | }, |
1296 | 1297 | { |
1297 | | - "match": "(?>(\\\\{2}u)|(\\\\u))(?>(\\h{4})|([^\"].{3,}))", |
| 1298 | + "match": "(?>(\\\\{2}u)|(\\\\u))(?>(\\h{4})|([^\"].{3,0}))", |
1298 | 1299 | "captures": { |
1299 | 1300 | "1": { "name": "variable.language.tm" }, |
1300 | 1301 | "2": { "name": "constant.character.escape.tm" }, |
|
1311 | 1312 | } |
1312 | 1313 | }, |
1313 | 1314 | { |
1314 | | - "match": "\\\\{2}(?>c|[CM](?>-|(.))?+)(?>(\\\\{3})(\\\\)|\\g<0>|(\\\\{2})?+(\\\\u.{4,}|\\\\?+.))?+", |
| 1315 | + "match": "\\\\{2}(?>c|[CM](?>-|(.))?+)(?>(\\\\{3})(\\\\)|\\g<0>|(\\\\{2})?+(\\\\u.{4,0}|\\\\?+.))?+", |
1315 | 1316 | "captures": { |
1316 | 1317 | "0": { "name": "punctuation.definition.list.begin.markdown.tm" }, |
1317 | 1318 | "1": { "name": "invalid.illegal.tm markup.underline regex" }, |
|
1325 | 1326 | } |
1326 | 1327 | }, |
1327 | 1328 | { |
| 1329 | + "//": "[pP] degrades performance :shrug:", |
| 1330 | + "comment": "https://github.com/kkos/oniguruma/blob/v6.9.8/doc/UNICODE_PROPERTIES", |
| 1331 | + "begin": "(\\\\{2}p{)(\\^)?+", |
| 1332 | + "end": "}|$|(?=[(){|\"])", |
| 1333 | + "beginCaptures": { |
| 1334 | + "1": { "name": "variable.language.tm" }, |
| 1335 | + "2": { "name": "support.function.tm" } |
| 1336 | + }, |
| 1337 | + "endCaptures": { "0": { "name": "variable.language.tm" } }, |
| 1338 | + "name": "unicode.properties.tm", |
| 1339 | + "patterns": [ |
| 1340 | + { |
| 1341 | + "match": "[a-zA-Z1]+", |
| 1342 | + "name": "variable.other.enummember.tm" |
| 1343 | + }, |
| 1344 | + { |
| 1345 | + "match": "[ _-]+", |
| 1346 | + "name": "comment.tm" |
| 1347 | + }, |
| 1348 | + { |
| 1349 | + "match": "[^\"(){}|a-zA-Z1 _-]+", |
| 1350 | + "name": "invalid.illegal.regex.tm" |
| 1351 | + } |
| 1352 | + ] |
| 1353 | + }, |
| 1354 | + { |
| 1355 | + "//": "[pP] degrades performance :shrug:", |
1328 | 1356 | "comment": "https://github.com/kkos/oniguruma/blob/v6.9.8/doc/UNICODE_PROPERTIES", |
1329 | | - "begin": "(\\\\{2}[pP]{)(\\^)?", |
| 1357 | + "begin": "(\\\\{2}P{)(\\^)?+", |
1330 | 1358 | "end": "}|$|(?=[(){|\"])", |
1331 | 1359 | "beginCaptures": { |
1332 | 1360 | "1": { "name": "variable.language.tm" }, |
|
1396 | 1424 | "patterns": [ |
1397 | 1425 | { |
1398 | 1426 | "comment": "\\1", |
1399 | | - "match": "(\\\\{2})([1-9][0-9]{2,})([0-9]*+)", |
| 1427 | + "match": "(\\\\{2})([1-9][0-9]{2,0})([0-9]*+)", |
1400 | 1428 | "captures": { |
1401 | 1429 | "1": { "name": "string.regexp.tm" }, |
1402 | 1430 | "2": { "name": "constant.numeric.tm" }, |
|
1433 | 1461 | "name": "invalid.illegal.tm markup.underline" |
1434 | 1462 | }, |
1435 | 1463 | { |
1436 | | - "match": "^(?>[+*?]|(?D){(?>\\d+,?\\d*|,\\d+)})", |
| 1464 | + "comment": "For some reason it isn't very performant using ^", |
| 1465 | + "match": "\\A(?>[+*?]|(?D){(?>\\d+,?\\d*|,\\d+)})", |
1437 | 1466 | "name": "invalid.illegal.tm markup.underline" |
1438 | 1467 | }, |
1439 | 1468 | { |
|
0 commit comments