exprType parameter = (exprType) stack.popNode();
return new DefaultArg((exprType) stack.popNode(), parameter, null, n.getId());
case JJTEXTRAARGLIST:
if (arity == 0) {
//nothing here (just '*')
return new ExtraArg(null, JJTEXTRAARGLIST, null);
}
return new ExtraArg(makeName(NameTok.VarArg), JJTEXTRAARGLIST);
case JJTEXTRAKEYWORDLIST:
return new ExtraArg(makeName(NameTok.KwArg), JJTEXTRAKEYWORDLIST);
case JJTEXTRAARGLIST2: //with type declaration
if (arity == 0) {
//nothing here (just '*')
return new ExtraArg(null, JJTEXTRAARGLIST, null);
}
jfpDef = (JfpDef) stack.popNode();
NameTok jfpDefName = makeName(NameTok.VarArg, jfpDef.nameNode);
ExtraArg extra = new ExtraArg(jfpDefName, JJTEXTRAARGLIST, jfpDef.typeDef);
return extra;
case JJTEXTRAKEYWORDLIST2: //with type declaration
jfpDef = (JfpDef) stack.popNode();
return new ExtraArg(makeName(NameTok.KwArg, jfpDef.nameNode), JJTEXTRAKEYWORDLIST, jfpDef.typeDef);
case JJTDECORATED:
if (stack.nodeArity() != 2) {
throw new RuntimeException("Expected 2 nodes at this context, found: " + arity);
}
SimpleNode def = stack.popNode();