JS: Restrict RegExp queries to actual regular expressions

This commit is contained in:
Asger F
2019-10-22 13:52:02 +01:00
parent b8711fc642
commit c21d095d38
12 changed files with 83 additions and 40 deletions

View File

@@ -17,7 +17,8 @@ from RegExpNegativeLookahead neg, RegExpGroup grp, RegExpBackRef back
where
grp.getParent+() = neg and
grp = back.getGroup() and
not back.getParent+() = neg
not back.getParent+() = neg and
neg.isPartOfRegExpLiteral()
select back,
"This back reference always matches the empty string, since it refers to $@, which is contained in $@.",
grp, "this capture group", neg, "a negative lookahead assertion"