@@ -312,19 +312,12 @@ class RegExpAlt extends RegExpTerm, @regexp_alt {
312312 */
313313class RegExpIntersection extends RegExpTerm , @regexp_intersection {
314314 /** Gets an intersected term of this term. */
315- RegExpTerm getIntersectedTerm ( ) { result = this .getAChild ( ) }
315+ RegExpTerm getAnElement ( ) { result = this .getAChild ( ) }
316316
317317 /** Gets the number of intersected terms of this term. */
318318 int getNumIntersectedTerm ( ) { result = this .getNumChild ( ) }
319319
320- override predicate isNullable ( ) { this .getIntersectedTerm ( ) .isNullable ( ) }
321-
322- override string getAMatchedString ( ) {
323- exists ( string s | s = this .getChild ( 0 ) .getAMatchedString ( ) |
324- forall ( int i | i in [ 1 .. this .getNumChild ( ) - 1 ] | s = this .getChild ( i ) .getAMatchedString ( ) ) and
325- result = s
326- )
327- }
320+ override predicate isNullable ( ) { this .getAnElement ( ) .isNullable ( ) }
328321
329322 override string getAPrimaryQlClass ( ) { result = "RegExpIntersection" }
330323}
@@ -339,13 +332,13 @@ class RegExpIntersection extends RegExpTerm, @regexp_intersection {
339332 * ```
340333 */
341334class RegExpSubtraction extends RegExpTerm , @regexp_subtraction {
342- /** Gets the minuend (the left operand) of this subtraction. */
335+ /** Gets the minuend (left operand) of this subtraction. */
343336 RegExpTerm getFirstTerm ( ) { result = this .getChild ( 0 ) }
344337
345338 /** Gets the number of subtractions terms of this term. */
346339 int getNumSubtractedTerm ( ) { result = this .getNumChild ( ) - 1 }
347340
348- /** Gets the subtrahend (the right operand) of this subtraction. */
341+ /** Gets a subtrahend (right operand) of this subtraction. */
349342 RegExpTerm getASubtractedTerm ( ) { exists ( int i | i > 0 and result = this .getChild ( i ) ) }
350343
351344 override predicate isNullable ( ) { none ( ) }
@@ -1207,11 +1200,11 @@ private class StringConcatRegExpPatternSource extends RegExpPatternSource {
12071200 */
12081201class RegExpQuotedString extends RegExpTerm , @regexp_quoted_string {
12091202 /** Gets the term representing the contents of this quoted string. */
1210- RegExpTerm getQuotedString ( ) { result = this .getAChild ( ) }
1203+ RegExpTerm getTerm ( ) { result = this .getAChild ( ) }
12111204
12121205 override predicate isNullable ( ) { none ( ) }
12131206
1214- override string getAMatchedString ( ) { result = this .getQuotedString ( ) .getAMatchedString ( ) }
1207+ override string getAMatchedString ( ) { result = this .getTerm ( ) .getAMatchedString ( ) }
12151208
12161209 override string getAPrimaryQlClass ( ) { result = "RegExpQuotedString" }
12171210}
0 commit comments