@@ -331,7 +331,6 @@ abstract class RegExp extends StringLiteral {
331331 predicate escapedCharacter ( int start , int end ) {
332332 this .escapingChar ( start ) and
333333 not this .numberedBackreference ( start , _, _) and
334- not this .namedBackreference ( start , _, _) and
335334 (
336335 // hex char \xhh
337336 this .getChar ( start + 1 ) = "x" and end = start + 4
@@ -639,17 +638,6 @@ abstract class RegExp extends StringLiteral {
639638 this .isGroupEnd ( inEnd )
640639 }
641640
642- /** Matches a named backreference, e.g. `\k<foo>`. */
643- predicate namedBackreference ( int start , int end , string name ) {
644- this .escapingChar ( start ) and
645- this .getChar ( start + 1 ) = "k" and
646- this .getChar ( start + 2 ) = "<" and
647- exists ( int nameEnd | nameEnd = min ( int i | i > start + 3 and this .getChar ( i ) = ">" ) |
648- end = nameEnd + 1 and
649- name = this .getText ( ) .substring ( start + 3 , nameEnd )
650- )
651- }
652-
653641 /** Matches a numbered backreference, e.g. `\1`. */
654642 predicate numberedBackreference ( int start , int end , int value ) {
655643 this .escapingChar ( start ) and
@@ -669,16 +657,11 @@ abstract class RegExp extends StringLiteral {
669657 /** Whether the text in the range `start,end` is a back reference */
670658 predicate backreference ( int start , int end ) {
671659 this .numberedBackreference ( start , end , _)
672- or
673- this .namedBackreference ( start , end , _)
674660 }
675661
676662 /** Gets the number of the back reference in start,end */
677663 int getBackRefNumber ( int start , int end ) { this .numberedBackreference ( start , end , result ) }
678664
679- /** Gets the name, if it has one, of the back reference in start,end */
680- string getBackRefName ( int start , int end ) { this .namedBackreference ( start , end , result ) }
681-
682665 private predicate baseItem ( int start , int end ) {
683666 this .characterItem ( start , end ) and
684667 not exists ( int x , int y | this .charSet ( x , y ) and x <= start and y >= end )
0 commit comments