while (removePositions.size() > 0) {
Integer pop = removePositions.pop();
params.remove((int) pop);
}
}
Call call;
if (isClassMethod && params.size() > 0) {
//We need to use the super() construct
//Something as:
//Expr[value=
// Call[func=
// Attribute[value=
// Call[func=Name[id=super, ctx=Load, reserved=false], args=[Name[id=Current, ctx=Load, reserved=false], Name[id=cls, ctx=Load, reserved=false]], keywords=[], starargs=null, kwargs=null],
// attr=NameTok[id=test, ctx=Attrib], ctx=Load],
// args=[], keywords=[], starargs=null, kwargs=null]
//]
exprType firstParam = params.remove(0);
Call innerCall = createCall("super", currentClassName, NodeUtils.getRepresentationString(firstParam));
Attribute attr = new Attribute(innerCall, new NameTok(NodeUtils.getRepresentationString(functionDef),
NameTok.Attrib), Attribute.Load);
call = new Call(attr, params.toArray(new Name[params.size()]), keywords.toArray(new keywordType[keywords
.size()]), starargs, kwargs);
} else {
call = createCall(parentClassName + "." + NodeUtils.getRepresentationString(functionDef), params,
keywords.toArray(new keywordType[keywords.size()]), starargs, kwargs);