if (func.getFunctions().size() > 1) {
throw new CommandlineError("should only have one main function", main);
}
if (main.getArity() == 1) {
return func.call(getMonitor(), new Type[] { tf.listType(tf.stringType()) },new IValue[] { parsePlainCommandLineArgs(commandline)}, null).getValue();
}
else if (main.hasKeywordArgs() && main.getArity() == 0) {
Map<String, IValue> args = parseKeywordCommandLineArgs(monitor, commandline, main);
return func.call(getMonitor(), new Type[] { },new IValue[] {}, args).getValue();
}