function getArgumentIndex(argumentsList, node) {
                // The list we got back can include commas.  In the presence of errors it may 
                // also just have nodes without commas.  For example "Foo(a b c)" will have 3 
                // args without commas.   We want to find what index we're at.  So we count
                // forward until we hit ourselves, only incrementing the index if it isn't a
                // comma.
                //
                // Note: the subtlety around trailing commas (in getArgumentCount) does not apply
                // here.  That's because we're only walking forward until we hit the node we're
                // on.  In that case, even if we're after the trailing comma, we'll still see
                // that trailing comma in the list, and we'll have generated the appropriate
                // arg index.
                var argumentIndex = 0;
                var listChildren = argumentsList.getChildren();
                for (var _i = 0, listChildren_1 = listChildren; _i < listChildren_1.length; _i++) {
                    var child = listChildren_1[_i];
                    if (child === node) {
                        break;
                    }
                    if (child.kind !== 24 /* CommaToken */) {
                        argumentIndex++;
                    }
                }
                return argumentIndex;
            }
Returns relevant information for the argument list and the current argument if we are
in the argument of an invocation; returns undefined otherwise.