@@ -55,10 +55,10 @@ class RegExpParent extends TRegExpParent {
5555 abstract RegExpTerm getChild ( int i ) ;
5656
5757 /** Gets a child term . */
58- RegExpTerm getAChild ( ) { result = getChild ( _) }
58+ RegExpTerm getAChild ( ) { result = this . getChild ( _) }
5959
6060 /** Gets the number of child terms. */
61- int getNumChild ( ) { result = count ( getAChild ( ) ) }
61+ int getNumChild ( ) { result = count ( this . getAChild ( ) ) }
6262
6363 /** Gets the associated regex. */
6464 abstract Regex getRegex ( ) ;
@@ -117,7 +117,7 @@ class RegExpTerm extends RegExpParent {
117117 RegExpTerm getRootTerm ( ) {
118118 this .isRootTerm ( ) and result = this
119119 or
120- result = getParent ( ) .( RegExpTerm ) .getRootTerm ( )
120+ result = this . getParent ( ) .( RegExpTerm ) .getRootTerm ( )
121121 }
122122
123123 /**
@@ -196,7 +196,7 @@ class RegExpTerm extends RegExpParent {
196196
197197 /** Gets the regular expression term that is matched (textually) before this one, if any. */
198198 RegExpTerm getPredecessor ( ) {
199- exists ( RegExpTerm parent | parent = getParent ( ) |
199+ exists ( RegExpTerm parent | parent = this . getParent ( ) |
200200 result = parent .( RegExpSequence ) .previousElement ( this )
201201 or
202202 not exists ( parent .( RegExpSequence ) .previousElement ( this ) ) and
@@ -207,7 +207,7 @@ class RegExpTerm extends RegExpParent {
207207
208208 /** Gets the regular expression term that is matched (textually) after this one, if any. */
209209 RegExpTerm getSuccessor ( ) {
210- exists ( RegExpTerm parent | parent = getParent ( ) |
210+ exists ( RegExpTerm parent | parent = this . getParent ( ) |
211211 result = parent .( RegExpSequence ) .nextElement ( this )
212212 or
213213 not exists ( parent .( RegExpSequence ) .nextElement ( this ) ) and
@@ -358,7 +358,7 @@ class RegExpSequence extends RegExpTerm, TRegExpSequence {
358358 override RegExpTerm getChild ( int i ) { result = seqChild ( re , start , end , i ) }
359359
360360 /** Gets the element preceding `element` in this sequence. */
361- RegExpTerm previousElement ( RegExpTerm element ) { element = nextElement ( result ) }
361+ RegExpTerm previousElement ( RegExpTerm element ) { element = this . nextElement ( result ) }
362362
363363 /** Gets the element following `element` in this sequence. */
364364 RegExpTerm nextElement ( RegExpTerm element ) {
@@ -461,8 +461,8 @@ class RegExpEscape extends RegExpNormalChar {
461461 // TODO: Find a way to include a formfeed character
462462 // this.getUnescaped() = "f" and result = ""
463463 // or
464- isUnicode ( ) and
465- result = getUnicode ( )
464+ this . isUnicode ( ) and
465+ result = this . getUnicode ( )
466466 }
467467
468468 predicate isIdentityEscape ( ) { not this .getUnescaped ( ) in [ "n" , "r" , "t" , "f" ] }
@@ -479,7 +479,7 @@ class RegExpEscape extends RegExpNormalChar {
479479 /**
480480 * Holds if this is a unicode escape.
481481 */
482- private predicate isUnicode ( ) { getText ( ) .prefix ( 2 ) = [ "\\u" , "\\U" ] }
482+ private predicate isUnicode ( ) { this . getText ( ) .prefix ( 2 ) = [ "\\u" , "\\U" ] }
483483
484484 /**
485485 * Gets the unicode char for this escape.
@@ -569,13 +569,13 @@ class RegExpCharacterClass extends RegExpTerm, TRegExpCharacterClass {
569569
570570 predicate isUniversalClass ( ) {
571571 // [^]
572- isInverted ( ) and not exists ( getAChild ( ) )
572+ this . isInverted ( ) and not exists ( this . getAChild ( ) )
573573 or
574574 // [\w\W] and similar
575- not isInverted ( ) and
575+ not this . isInverted ( ) and
576576 exists ( string cce1 , string cce2 |
577- cce1 = getAChild ( ) .( RegExpCharacterClassEscape ) .getValue ( ) and
578- cce2 = getAChild ( ) .( RegExpCharacterClassEscape ) .getValue ( )
577+ cce1 = this . getAChild ( ) .( RegExpCharacterClassEscape ) .getValue ( ) and
578+ cce2 = this . getAChild ( ) .( RegExpCharacterClassEscape ) .getValue ( )
579579 |
580580 cce1 != cce2 and cce1 .toLowerCase ( ) = cce2 .toLowerCase ( )
581581 )
0 commit comments