mirror of
https://github.com/github/codeql.git
synced 2025-12-20 10:46:30 +01:00
Sync shared library changes across languages.
This commit is contained in:
@@ -610,10 +610,15 @@ State after(RegExpTerm t) {
|
||||
or
|
||||
exists(RegExpGroup grp | t = grp.getAChild() | result = after(grp))
|
||||
or
|
||||
exists(EffectivelyStar star | t = star.getAChild() | result = before(star))
|
||||
exists(EffectivelyStar star | t = star.getAChild() |
|
||||
not isPossessive(star) and
|
||||
result = before(star)
|
||||
)
|
||||
or
|
||||
exists(EffectivelyPlus plus | t = plus.getAChild() |
|
||||
result = before(plus) or
|
||||
not isPossessive(plus) and
|
||||
result = before(plus)
|
||||
or
|
||||
result = after(plus)
|
||||
)
|
||||
or
|
||||
|
||||
@@ -13,6 +13,12 @@ predicate isEscapeClass(RegExpTerm term, string clazz) {
|
||||
exists(RegExpCharacterClassEscape escape | term = escape | escape.getValue() = clazz)
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if `term` is a possessive quantifier.
|
||||
* As python's regexes do not support possessive quantifiers, this never holds, but is used by the shared library.
|
||||
*/
|
||||
predicate isPossessive(RegExpQuantifier term) { none() }
|
||||
|
||||
/**
|
||||
* Holds if the regular expression should not be considered.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user