{
return supposedNode;
}
if (supposedNode instanceof Class)
{
HaxeTree node = ((Class)supposedNode).getConstructor();
return getValidNodeForCallAnalysis(node);
}
if (supposedNode instanceof NewNode)
{
// TODO by our logic here we should return function - not the
// class or type
HaxeTree node = ((NewNode)supposedNode).getObjectWhichIsCreated();
return getValidNodeForCallAnalysis(node);
}
if (supposedNode instanceof MethodCall)
{
HaxeTree node = ((MethodCall)supposedNode).getDeclarationNode();
return getValidNodeForCallAnalysis(node);
}
return getValidNodeForCallAnalysis(supposedNode.getParent());
}