File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
swift/ql/lib/codeql/swift/regex/internal Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ abstract class RegExp extends Expr {
24
24
predicate isIgnoreCase ( ) { this .getAMode ( ) = "IGNORECASE" }
25
25
26
26
/**
27
- * Gets a string repreenting the flags for this `RegExp`, or the empty string if it has no flags.
27
+ * Gets a string representing the flags for this `RegExp`, or the empty string if it has no flags.
28
28
*/
29
29
string getFlags ( ) { result = concat ( string mode | mode = this .getAMode ( ) | mode , " | " ) }
30
30
@@ -275,10 +275,7 @@ abstract class RegExp extends Expr {
275
275
private predicate isGroupStart ( int i ) { this .nonEscapedCharAt ( i ) = "(" and not this .inCharSet ( i ) }
276
276
277
277
/**
278
- * Holds if a parse mode prefix starts between `start` and `end`. For example:
279
- * ```
280
- * (?i)
281
- * ```
278
+ * Holds if a parse mode starts between `start` and `end`.
282
279
*/
283
280
private predicate flagGroupStart ( int start , int end ) {
284
281
this .isGroupStart ( start ) and
@@ -288,8 +285,11 @@ abstract class RegExp extends Expr {
288
285
}
289
286
290
287
/**
291
- * Holds if a parse mode prefix group is between `start` and `end`, and includes the
292
- * mode flag `c`.
288
+ * Holds if a parse mode group is between `start` and `end`, and includes the
289
+ * mode flag `c`. For example the following span, with mode flag `i`:
290
+ * ```
291
+ * (?i)
292
+ * ```
293
293
*/
294
294
private predicate flagGroup ( int start , int end , string c ) {
295
295
exists ( int inStart , int inEnd |
You can’t perform that action at this time.
0 commit comments