stmt makeFuncdef(Token t, Token nameToken, arguments args, List funcStatements, List decorators) {
if (nameToken == null) {
return errorHandler.errorStmt(new PythonTree(t));
}
Name n = cantBeNoneName(nameToken);
arguments a;
if (args != null) {
a = args;
} else {
a = new arguments(t, new ArrayList<expr>(), (Name)null, null, new ArrayList<expr>());
}
List<stmt> s = castStmts(funcStatements);
List<expr> d = castExprs(decorators);
return new FunctionDef(t, n, a, s, d);
}