Skip to content

Commit 5e7026c

Browse files
committed
JS: Use AccessPath as parameter type
1 parent 93a9c62 commit 5e7026c

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

javascript/ql/lib/semmle/javascript/frameworks/data/internal/ApiGraphModelsExport.qll

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,14 @@ private import Shared
1818
*/
1919
bindingset[type, path]
2020
private predicate partiallyEvaluatedModel(
21-
string type, string path, API::Node node, string remainingPath
21+
string type, AccessPath path, API::Node node, string remainingPath
2222
) {
23-
exists(int n, AccessPath accessPath |
24-
accessPath = path and
25-
getNodeFromPath(type, accessPath, n) = node and
23+
exists(int n |
24+
getNodeFromPath(type, path, n) = node and
2625
n > 0 and
27-
// Note that `n < accessPath.getNumToken()` is implied by the use of strictconcat()
26+
// Note that `n < path.getNumToken()` is implied by the use of strictconcat()
2827
remainingPath =
29-
strictconcat(int k |
30-
k = [n .. accessPath.getNumToken() - 1]
31-
|
32-
accessPath.getToken(k), "." order by k
33-
)
28+
strictconcat(int k | k = [n .. path.getNumToken() - 1] | path.getToken(k), "." order by k)
3429
)
3530
}
3631

0 commit comments

Comments
 (0)