@@ -358,6 +358,11 @@ class RegExpSequence extends RegExpTerm, TRegExpSequence {
358
358
override string getPrimaryQLClass ( ) { result = "RegExpSequence" }
359
359
}
360
360
361
+ pragma [ nomagic]
362
+ private int seqChildEnd ( Regex re , int start , int end , int i ) {
363
+ result = seqChild ( re , start , end , i ) .getEnd ( )
364
+ }
365
+
361
366
// moved out so we can use it in the charpred
362
367
private RegExpTerm seqChild ( Regex re , int start , int end , int i ) {
363
368
re .sequence ( start , end ) and
@@ -372,7 +377,7 @@ private RegExpTerm seqChild(Regex re, int start, int end, int i) {
372
377
or
373
378
i > 0 and
374
379
result .getRegex ( ) = re and
375
- exists ( int itemStart | itemStart = seqChild ( re , start , end , i - 1 ) . getEnd ( ) |
380
+ exists ( int itemStart | itemStart = seqChildEnd ( re , start , end , i - 1 ) |
376
381
result .getStart ( ) = itemStart and
377
382
re .item ( itemStart , result .getEnd ( ) )
378
383
)
@@ -440,7 +445,7 @@ class RegExpEscape extends RegExpNormalChar {
440
445
or
441
446
this .getUnescaped ( ) = "t" and result = "\t"
442
447
or
443
- this .getUnescaped ( ) = "f" and result = ""
448
+ this .getUnescaped ( ) = "f" and result = "\ f "
444
449
or
445
450
isUnicode ( ) and
446
451
result = getUnicode ( )
0 commit comments