JS: Update use of API graphs library in features for ML-powered queries

Co-authored-by: Aditya Sharad <adityasharad@github.com>
This commit is contained in:
Henry Mercer
2021-12-03 12:17:56 +00:00
parent 802faf1197
commit f4a310caba

View File

@@ -247,11 +247,12 @@ private module AccessPaths {
else accessPath = previousAccessPath + " " + paramName else accessPath = previousAccessPath + " " + paramName
) )
or or
exists(string callbackName, string index | exists(string callbackName, int index |
node = node =
getNamedParameter(previousNode.getASuccessor("param " + index).getMember(callbackName), getNamedParameter(previousNode
paramName) and .getASuccessor(API::Label::parameter(index))
index != "-1" and // ignore receiver .getMember(callbackName), paramName) and
index != -1 and // ignore receiver
if includeStructuralInfo = true if includeStructuralInfo = true
then then
accessPath = accessPath =