Java: QLDoc.

This commit is contained in:
Geoffrey White
2023-07-20 11:53:52 +01:00
parent 80cb386ffd
commit 45a9d5bc7d

View File

@@ -472,6 +472,9 @@ abstract class RegexString extends StringLiteral {
)
}
/**
* Holds if a parse mode starts between `start` and `end`.
*/
private predicate flagGroupStart(int start, int end) {
this.isGroupStart(start) and
this.getChar(start + 1) = "?" and
@@ -479,6 +482,13 @@ abstract class RegexString extends StringLiteral {
end = start + 2
}
/**
* Holds if a parse mode group is between `start` and `end`, and includes the
* mode flag `c`. For example the following span, with mode flag `i`:
* ```
* (?i)
* ```
*/
private predicate flagGroup(int start, int end, string c) {
exists(int inStart, int inEnd |
this.flagGroupStart(start, inStart) and