for (String pack : usages.keySet())
{
for (NodeLink info : usages.get(pack))
{
HaxeTree node = info.getNode();
Pair pair = null;
if (node instanceof MethodCall)
{
node = node.getChild(0);
}
if (node instanceof Function)
{
node = node.getChild(0);
pair = new Pair(
node.getTokenStartIndex(),
node.getTokenStopIndex() - node.getTokenStartIndex() + 1);
}
else if (node instanceof Usage)
{
pair = new Pair(
node.getTokenStartIndex(),
node.getTokenStopIndex() - node.getTokenStartIndex() + 1);
}
targets.put(pack, pair);
}