Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent adc1466 commit 1caafb8Copy full SHA for 1caafb8
1 file changed
ql/ql/src/codeql_ql/ast/Ast.qll
@@ -2217,6 +2217,20 @@ class ModuleExpr extends TModuleExpr, ModuleRef {
2217
result = super.getAChild(pred)
2218
or
2219
pred = directMember("getQualifier") and result = this.getQualifier()
2220
+ or
2221
+ exists(int i | pred = indexedMember("getArgument", i) and result = this.getArgument(i))
2222
+ }
2223
+
2224
+ /**
2225
+ * Gets the `i`th type argument if this module is a module instantiation.
2226
+ * The result is either a `PredicateExpr` or a `TypeExpr`.
2227
+ */
2228
+ AstNode getArgument(int i) {
2229
+ exists(QL::ModuleInstantiation instantiation | instantiation.getParent() = me |
2230
+ toQL(result) = instantiation.getChild(i).getPredicate()
2231
2232
+ toQL(result) = instantiation.getChild(i).getTypeExpr()
2233
+ )
2234
}
2235
2236
0 commit comments