JavaScript: Make a useful member predicate public.

This commit is contained in:
Max Schaefer
2018-10-30 09:28:04 -04:00
parent 336f605153
commit 3d2a27b039
2 changed files with 3 additions and 5 deletions

View File

@@ -105,7 +105,7 @@ class AMDModuleDefinition extends CallExpr {
* parameters `pdep1` and `pdep2` correspond to dependencies
* `dep1` and `dep2`.
*/
private SimpleParameter getDependencyParameter(string name) {
Parameter getDependencyParameter(string name) {
exists (PathExpr dep |
dependencyParameter(dep, result) and
dep.getValue() = name

View File

@@ -399,10 +399,8 @@ class ModuleImportNode extends DataFlow::DefaultSourceNode {
)
or
// declared AMD dependency
exists (AMDModuleDefinition amd, PathExpr dep, Parameter p |
amd.dependencyParameter(dep, p) and
path = dep.getValue() and
this = DataFlow::parameterNode(p)
exists (AMDModuleDefinition amd |
this = DataFlow::parameterNode(amd.getDependencyParameter(path))
)
or
// AMD require