mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
20 lines
664 B
Plaintext
20 lines
664 B
Plaintext
import javascript
|
|
|
|
query predicate comprehensionBlock(ComprehensionBlock cb, Expr dom, BindingPattern iter) {
|
|
iter = cb.getIterator() and dom = cb.getDomain()
|
|
}
|
|
|
|
query predicate comprehensionExpr(ComprehensionExpr ce, int numBlock, int numFilter, Expr body) {
|
|
numBlock = ce.getNumBlock() and
|
|
numFilter = ce.getNumFilter() and
|
|
body = ce.getBody()
|
|
}
|
|
|
|
query predicate getBlock(ComprehensionExpr ce, int i, ComprehensionBlock block) {
|
|
ce.getBlock(i) = block
|
|
}
|
|
|
|
query predicate getFilter(ComprehensionExpr ce, int i, Expr filter) { ce.getFilter(i) = filter }
|
|
|
|
query predicate varDecls(VarAccess va, VarDecl decl) { decl = va.getVariable().getADeclaration() }
|