44 * It must export the following members:
55 * ```ql
66 * class Unit // a unit type
7- * module AccessPathSyntax // a re-export of the AccessPathSyntax module
87 * class InvokeNode // a type representing an invocation connected to the API graph
98 * module API // the API graph module
109 * predicate isPackageUsed(string package)
1110 * API::Node getExtraNodeFromPath(string package, string type, string path, int n)
12- * API::Node getExtraSuccessorFromNode(API::Node node, AccessPathToken token)
13- * API::Node getExtraSuccessorFromInvoke(InvokeNode node, AccessPathToken token)
14- * predicate invocationMatchesExtraCallSiteFilter(InvokeNode invoke, AccessPathToken token)
11+ * API::Node getExtraSuccessorFromNode(API::Node node, AccessPathTokenBase token)
12+ * API::Node getExtraSuccessorFromInvoke(InvokeNode node, AccessPathTokenBase token)
13+ * predicate invocationMatchesExtraCallSiteFilter(InvokeNode invoke, AccessPathTokenBase token)
1514 * InvokeNode getAnInvocationOf(API::Node node)
1615 * predicate isExtraValidTokenNameInIdentifyingAccessPath(string name)
1716 * predicate isExtraValidNoArgumentTokenInIdentifyingAccessPath(string name)
@@ -25,9 +24,7 @@ private import ApiGraphModels
2524// Re-export libraries needed by ApiGraphModels.qll
2625module API = JS:: API;
2726
28- import semmle.javascript.frameworks.data.internal.AccessPathSyntax as AccessPathSyntax
2927import JS:: DataFlow as DataFlow
30- private import AccessPathSyntax
3128
3229/**
3330 * Holds if `rawType` represents the JavaScript type `qualifiedName` from the given NPM `package`.
@@ -137,7 +134,7 @@ API::Node getExtraNodeFromType(string type) {
137134 * Gets a JavaScript-specific API graph successor of `node` reachable by resolving `token`.
138135 */
139136bindingset [ token]
140- API:: Node getExtraSuccessorFromNode ( API:: Node node , AccessPathToken token ) {
137+ API:: Node getExtraSuccessorFromNode ( API:: Node node , AccessPathTokenBase token ) {
141138 token .getName ( ) = "Member" and
142139 result = node .getMember ( token .getAnArgument ( ) )
143140 or
@@ -183,7 +180,7 @@ API::Node getExtraSuccessorFromNode(API::Node node, AccessPathToken token) {
183180 * Gets a JavaScript-specific API graph successor of `node` reachable by resolving `token`.
184181 */
185182bindingset [ token]
186- API:: Node getExtraSuccessorFromInvoke ( API:: InvokeNode node , AccessPathToken token ) {
183+ API:: Node getExtraSuccessorFromInvoke ( API:: InvokeNode node , AccessPathTokenBase token ) {
187184 token .getName ( ) = "Instance" and
188185 result = node .getInstance ( )
189186 or
@@ -233,7 +230,7 @@ API::Node getAFuzzySuccessor(API::Node node) {
233230 * Holds if `invoke` matches the JS-specific call site filter in `token`.
234231 */
235232bindingset [ token]
236- predicate invocationMatchesExtraCallSiteFilter ( API:: InvokeNode invoke , AccessPathToken token ) {
233+ predicate invocationMatchesExtraCallSiteFilter ( API:: InvokeNode invoke , AccessPathTokenBase token ) {
237234 token .getName ( ) = "NewCall" and
238235 invoke instanceof API:: NewNode
239236 or
@@ -246,9 +243,8 @@ predicate invocationMatchesExtraCallSiteFilter(API::InvokeNode invoke, AccessPat
246243 operand = token .getAnArgument ( ) and
247244 argIndex = operand .splitAt ( "=" , 0 ) and
248245 stringValue = operand .splitAt ( "=" , 1 ) and
249- invoke
250- .getArgument ( AccessPath:: parseIntWithArity ( argIndex , invoke .getNumArgument ( ) ) )
251- .getStringValue ( ) = stringValue
246+ invoke .getArgument ( parseIntWithArity ( argIndex , invoke .getNumArgument ( ) ) ) .getStringValue ( ) =
247+ stringValue
252248 )
253249}
254250
@@ -338,7 +334,7 @@ predicate isExtraValidTokenArgumentInIdentifyingAccessPath(string name, string a
338334 or
339335 name = "WithStringArgument" and
340336 exists ( argument .indexOf ( "=" ) ) and
341- exists ( AccessPath :: parseIntWithArity ( argument .splitAt ( "=" , 0 ) , 10 ) )
337+ exists ( parseIntWithArity ( argument .splitAt ( "=" , 0 ) , 10 ) )
342338}
343339
344340module ModelOutputSpecific {
0 commit comments