mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
use shouldPrint to filter out regular expressions from other files
This commit is contained in:
@@ -74,7 +74,11 @@ private newtype TPrintAstNode =
|
||||
THTMLAttributeNode(HTML::Attribute attr) { shouldPrint(attr, _) and not isNotNeeded(attr) } or
|
||||
THTMLScript(Script script) { shouldPrint(script, _) and not isNotNeeded(script) } or
|
||||
THTMLCodeInAttr(CodeInAttribute attr) { shouldPrint(attr, _) and not isNotNeeded(attr) } or
|
||||
TRegExpTermNode(RegExpTerm term) { term.isUsedAsRegExp() }
|
||||
TRegExpTermNode(RegExpTerm term) {
|
||||
shouldPrint(term, _) and
|
||||
term.isUsedAsRegExp() and
|
||||
any(RegExpLiteral lit).getRoot() = term.getRootTerm()
|
||||
}
|
||||
|
||||
/**
|
||||
* A node in the output tree.
|
||||
|
||||
Reference in New Issue
Block a user