@@ -475,74 +475,74 @@ extension RegexTests {
475
475
476
476
// Matching option changing groups.
477
477
parseTest ( " (?-) " , changeMatchingOptions (
478
- matchingOptions ( ) , hasImplicitScope : true , empty ( ) )
478
+ matchingOptions ( ) , isIsolated : true , empty ( ) )
479
479
)
480
480
parseTest ( " (?i) " , changeMatchingOptions (
481
481
matchingOptions ( adding: . caseInsensitive) ,
482
- hasImplicitScope : true , empty ( ) )
482
+ isIsolated : true , empty ( ) )
483
483
)
484
484
parseTest ( " (?m) " , changeMatchingOptions (
485
485
matchingOptions ( adding: . multiline) ,
486
- hasImplicitScope : true , empty ( ) )
486
+ isIsolated : true , empty ( ) )
487
487
)
488
488
parseTest ( " (?x) " , changeMatchingOptions (
489
489
matchingOptions ( adding: . extended) ,
490
- hasImplicitScope : true , empty ( ) )
490
+ isIsolated : true , empty ( ) )
491
491
)
492
492
parseTest ( " (?xx) " , changeMatchingOptions (
493
493
matchingOptions ( adding: . extraExtended) ,
494
- hasImplicitScope : true , empty ( ) )
494
+ isIsolated : true , empty ( ) )
495
495
)
496
496
parseTest ( " (?xxx) " , changeMatchingOptions (
497
497
matchingOptions ( adding: . extraExtended, . extended) ,
498
- hasImplicitScope : true , empty ( ) )
498
+ isIsolated : true , empty ( ) )
499
499
)
500
500
parseTest ( " (?-i) " , changeMatchingOptions (
501
501
matchingOptions ( removing: . caseInsensitive) ,
502
- hasImplicitScope : true , empty ( ) )
502
+ isIsolated : true , empty ( ) )
503
503
)
504
504
parseTest ( " (?i-s) " , changeMatchingOptions (
505
505
matchingOptions ( adding: . caseInsensitive, removing: . singleLine) ,
506
- hasImplicitScope : true , empty ( ) )
506
+ isIsolated : true , empty ( ) )
507
507
)
508
508
parseTest ( " (?i-is) " , changeMatchingOptions (
509
509
matchingOptions ( adding: . caseInsensitive,
510
510
removing: . caseInsensitive, . singleLine) ,
511
- hasImplicitScope : true , empty ( ) )
511
+ isIsolated : true , empty ( ) )
512
512
)
513
513
514
514
parseTest ( " (?:) " , nonCapture ( empty ( ) ) )
515
515
parseTest ( " (?-:) " , changeMatchingOptions (
516
- matchingOptions ( ) , hasImplicitScope : false , empty ( ) )
516
+ matchingOptions ( ) , isIsolated : false , empty ( ) )
517
517
)
518
518
parseTest ( " (?i:) " , changeMatchingOptions (
519
519
matchingOptions ( adding: . caseInsensitive) ,
520
- hasImplicitScope : false , empty ( ) )
520
+ isIsolated : false , empty ( ) )
521
521
)
522
522
parseTest ( " (?-i:) " , changeMatchingOptions (
523
523
matchingOptions ( removing: . caseInsensitive) ,
524
- hasImplicitScope : false , empty ( ) )
524
+ isIsolated : false , empty ( ) )
525
525
)
526
526
527
527
parseTest ( " (?^) " , changeMatchingOptions (
528
528
unsetMatchingOptions ( ) ,
529
- hasImplicitScope : true , empty ( ) )
529
+ isIsolated : true , empty ( ) )
530
530
)
531
531
parseTest ( " (?^:) " , changeMatchingOptions (
532
532
unsetMatchingOptions ( ) ,
533
- hasImplicitScope : false , empty ( ) )
533
+ isIsolated : false , empty ( ) )
534
534
)
535
535
parseTest ( " (?^ims:) " , changeMatchingOptions (
536
536
unsetMatchingOptions ( adding: . caseInsensitive, . multiline, . singleLine) ,
537
- hasImplicitScope : false , empty ( ) )
537
+ isIsolated : false , empty ( ) )
538
538
)
539
539
parseTest ( " (?^J:) " , changeMatchingOptions (
540
540
unsetMatchingOptions ( adding: . allowDuplicateGroupNames) ,
541
- hasImplicitScope : false , empty ( ) )
541
+ isIsolated : false , empty ( ) )
542
542
)
543
543
parseTest ( " (?^y{w}:) " , changeMatchingOptions (
544
544
unsetMatchingOptions ( adding: . textSegmentWordMode) ,
545
- hasImplicitScope : false , empty ( ) )
545
+ isIsolated : false , empty ( ) )
546
546
)
547
547
548
548
let allOptions : [ AST . MatchingOption . Kind ] = [
@@ -557,44 +557,44 @@ extension RegexTests {
557
557
adding: allOptions,
558
558
removing: allOptions. dropLast ( 2 )
559
559
) ,
560
- hasImplicitScope : true , empty ( ) )
560
+ isIsolated : true , empty ( ) )
561
561
)
562
562
parseTest ( " (?iJmnsUxxxwDPSWy{g}y{w}-iJmnsUxxxwDPSW:) " , changeMatchingOptions (
563
563
matchingOptions (
564
564
adding: allOptions,
565
565
removing: allOptions. dropLast ( 2 )
566
566
) ,
567
- hasImplicitScope : false , empty ( ) )
567
+ isIsolated : false , empty ( ) )
568
568
)
569
569
570
570
parseTest (
571
571
" a(b(?i)c)d " , concat ( " a " , capture ( concat ( " b " , changeMatchingOptions (
572
572
matchingOptions ( adding: . caseInsensitive) ,
573
- hasImplicitScope : true , " c " ) ) ) , " d " ) ,
573
+ isIsolated : true , " c " ) ) ) , " d " ) ,
574
574
captures: . atom( )
575
575
)
576
576
parseTest (
577
577
" (a(?i)b(c)d) " , capture ( concat ( " a " , changeMatchingOptions (
578
578
matchingOptions ( adding: . caseInsensitive) ,
579
- hasImplicitScope : true , concat ( " b " , capture ( " c " ) , " d " ) ) ) ) ,
579
+ isIsolated : true , concat ( " b " , capture ( " c " ) , " d " ) ) ) ) ,
580
580
captures: . tuple( . atom( ) , . atom( ) )
581
581
)
582
582
parseTest (
583
583
" (a(?i)b(?#hello)c) " , capture ( concat ( " a " , changeMatchingOptions (
584
584
matchingOptions ( adding: . caseInsensitive) ,
585
- hasImplicitScope : true , concat ( " b " , " c " ) ) ) ) ,
585
+ isIsolated : true , concat ( " b " , " c " ) ) ) ) ,
586
586
captures: . atom( )
587
587
)
588
588
589
589
// TODO: This is Oniguruma's behavior, but PCRE treats it as:
590
590
// ab(?i:c)|(?i:def)|(?i:gh)
591
591
// instead. We ought to have a mode to emulate that.
592
592
parseTest ( " ab(?i)c|def|gh " , concat ( " a " , " b " , changeMatchingOptions (
593
- matchingOptions ( adding: . caseInsensitive) , hasImplicitScope : true ,
593
+ matchingOptions ( adding: . caseInsensitive) , isIsolated : true ,
594
594
alt ( " c " , concat ( " d " , " e " , " f " ) , concat ( " g " , " h " ) ) ) ) )
595
595
596
596
parseTest ( " (a|b(?i)c|d) " , capture ( alt ( " a " , concat ( " b " , changeMatchingOptions (
597
- matchingOptions ( adding: . caseInsensitive) , hasImplicitScope : true ,
597
+ matchingOptions ( adding: . caseInsensitive) , isIsolated : true ,
598
598
alt ( " c " , " d " ) ) ) ) ) ,
599
599
captures: . atom( ) )
600
600
0 commit comments