mirror of
https://github.com/github/codeql.git
synced 2026-04-26 09:15:12 +02:00
add RegExpSubPattern.getOperand
This commit is contained in:
committed by
GitHub
parent
8bd663a7ce
commit
5e63b0b132
@@ -624,6 +624,15 @@ class RegExpZeroWidthMatch extends RegExpGroup {
|
||||
*/
|
||||
class RegExpSubPattern extends RegExpZeroWidthMatch {
|
||||
RegExpSubPattern() { not re.emptyGroup(start, end) }
|
||||
|
||||
/** Gets the lookahead term. */
|
||||
RegExpTerm getOperand() {
|
||||
exists(int in_start, int in_end | re.groupContents(start, end, in_start, in_end) |
|
||||
result.getRegExp() = re and
|
||||
result.getStart() = in_start and
|
||||
result.getEnd() = in_end
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
abstract class RegExpLookahead extends RegExpSubPattern { }
|
||||
|
||||
Reference in New Issue
Block a user