}
return null;
}
private static void doc(DocCommand options) {
AbstractProcessor processor;
switch (options.format) {
case "markdown":
processor = new MarkdownProcessor();
break;
case "html":
processor = new HtmlProcessor();
break;
case "ctags":
processor = new CtagsProcessor();
break;
default:
throw new AssertionError("WTF?");
}
HashMap<String, ASTCompilationUnit> units = new HashMap<>();
for (String source : options.sources) {
loadGoloFileCompilationUnit(source, units);
}
try {
processor.process(units, Paths.get(options.output));
} catch (Throwable throwable) {
System.out.println("[error] " + throwable.getMessage());
}
}