@Override
protected void emitSuperCall(IASNode node, String type)
{
IFunctionNode fnode = (node instanceof IFunctionNode) ? (IFunctionNode) node
: null;
IFunctionCallNode fcnode = (node instanceof IFunctionCallNode) ? (FunctionCallNode) node
: null;
if (type == CONSTRUCTOR_EMPTY)
{
indentPush();
writeNewline();
indentPop();
}
else if (type == SUPER_FUNCTION_CALL)
{
if (fnode == null)
fnode = (IFunctionNode) fcnode
.getAncestorOfType(IFunctionNode.class);
}
if (fnode != null && fnode.isConstructor() && !hasSuperClass(fnode))
return;
IClassNode cnode = (IClassNode) node
.getAncestorOfType(IClassNode.class);
write(cnode.getQualifiedName());
write(ASEmitterTokens.MEMBER_ACCESS);
write(JSGoogEmitterTokens.GOOG_BASE);
write(ASEmitterTokens.PAREN_OPEN);
write(ASEmitterTokens.THIS);
if (fnode != null && fnode.isConstructor())
{
writeToken(ASEmitterTokens.COMMA);
write(ASEmitterTokens.SINGLE_QUOTE);
write(JSGoogEmitterTokens.GOOG_CONSTRUCTOR);
write(ASEmitterTokens.SINGLE_QUOTE);
}
if (fnode != null && !fnode.isConstructor())
{
writeToken(ASEmitterTokens.COMMA);
write(ASEmitterTokens.SINGLE_QUOTE);
if (fnode.getNodeID() == ASTNodeID.GetterID
|| fnode.getNodeID() == ASTNodeID.SetterID)
writeGetSetPrefix(fnode.getNodeID() == ASTNodeID.GetterID);
write(fnode.getName());
write(ASEmitterTokens.SINGLE_QUOTE);
}
IASNode[] anodes = null;
boolean writeArguments = false;
if (fcnode != null)
{
anodes = fcnode.getArgumentNodes();
writeArguments = anodes.length > 0;
}
else if (fnode != null && fnode.isConstructor())
{