@@ -312,19 +312,12 @@ class RegExpAlt extends RegExpTerm, @regexp_alt {
312
312
*/
313
313
class RegExpIntersection extends RegExpTerm , @regexp_intersection {
314
314
/** Gets an intersected term of this term. */
315
- RegExpTerm getIntersectedTerm ( ) { result = this .getAChild ( ) }
315
+ RegExpTerm getAnElement ( ) { result = this .getAChild ( ) }
316
316
317
317
/** Gets the number of intersected terms of this term. */
318
318
int getNumIntersectedTerm ( ) { result = this .getNumChild ( ) }
319
319
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 ( ) }
328
321
329
322
override string getAPrimaryQlClass ( ) { result = "RegExpIntersection" }
330
323
}
@@ -339,13 +332,13 @@ class RegExpIntersection extends RegExpTerm, @regexp_intersection {
339
332
* ```
340
333
*/
341
334
class RegExpSubtraction extends RegExpTerm , @regexp_subtraction {
342
- /** Gets the minuend (the left operand) of this subtraction. */
335
+ /** Gets the minuend (left operand) of this subtraction. */
343
336
RegExpTerm getFirstTerm ( ) { result = this .getChild ( 0 ) }
344
337
345
338
/** Gets the number of subtractions terms of this term. */
346
339
int getNumSubtractedTerm ( ) { result = this .getNumChild ( ) - 1 }
347
340
348
- /** Gets the subtrahend (the right operand) of this subtraction. */
341
+ /** Gets a subtrahend (right operand) of this subtraction. */
349
342
RegExpTerm getASubtractedTerm ( ) { exists ( int i | i > 0 and result = this .getChild ( i ) ) }
350
343
351
344
override predicate isNullable ( ) { none ( ) }
@@ -1207,11 +1200,11 @@ private class StringConcatRegExpPatternSource extends RegExpPatternSource {
1207
1200
*/
1208
1201
class RegExpQuotedString extends RegExpTerm , @regexp_quoted_string {
1209
1202
/** Gets the term representing the contents of this quoted string. */
1210
- RegExpTerm getQuotedString ( ) { result = this .getAChild ( ) }
1203
+ RegExpTerm getTerm ( ) { result = this .getAChild ( ) }
1211
1204
1212
1205
override predicate isNullable ( ) { none ( ) }
1213
1206
1214
- override string getAMatchedString ( ) { result = this .getQuotedString ( ) .getAMatchedString ( ) }
1207
+ override string getAMatchedString ( ) { result = this .getTerm ( ) .getAMatchedString ( ) }
1215
1208
1216
1209
override string getAPrimaryQlClass ( ) { result = "RegExpQuotedString" }
1217
1210
}
0 commit comments