aboutsummaryrefslogtreecommitdiff
path: root/node_modules/call-matcher/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/call-matcher/index.js')
-rw-r--r--node_modules/call-matcher/index.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/node_modules/call-matcher/index.js b/node_modules/call-matcher/index.js
index 24163e354..a234a4b93 100644
--- a/node_modules/call-matcher/index.js
+++ b/node_modules/call-matcher/index.js
@@ -4,7 +4,7 @@
*
* https://github.com/twada/call-matcher
*
- * Copyright (c) 2015-2016 Takuto Wada
+ * Copyright (c) 2015-2018 Takuto Wada
* Licensed under the MIT license.
* https://github.com/twada/call-matcher/blob/master/MIT-LICENSE.txt
*/
@@ -109,15 +109,17 @@ CallMatcher.prototype.isSameDepthAsSignatureCallee = function (ast) {
return (depth === currentDepth);
};
-function toArgumentSignature (argSignatureNode) {
+function toArgumentSignature (argSignatureNode, idx) {
switch(argSignatureNode.type) {
case syntax.Identifier:
return {
+ index: idx,
name: argSignatureNode.name,
kind: 'mandatory'
};
case syntax.ArrayExpression:
return {
+ index: idx,
name: argSignatureNode.elements[0].name,
kind: 'optional'
};