diff options
Diffstat (limited to 'src/main.kt')
-rw-r--r-- | src/main.kt | 35 |
1 files changed, 5 insertions, 30 deletions
diff --git a/src/main.kt b/src/main.kt index 04415070..f71cfccb 100644 --- a/src/main.kt +++ b/src/main.kt @@ -27,36 +27,11 @@ public fun main(args: Array<String>) { println() - val results = environment.processFiles { context, file -> + val result = environment.processFiles { context, file -> println("Processing: ${file.getName()}") - println() - context.analyseFile(file) - } - - println() - println("Results:") - results.forEach { - println(it) - } + context.createDocumentation(file) + }.fold(DocumentationModel()) {(aggregate, item) -> aggregate.merge(item) } + println(result) Disposer.dispose(environment) -} - - -fun BindingContext.analyseFile(file: JetFile) { - val packageFragment = getPackageFragment(file) - if (packageFragment == null) { - println("PackageFragment is null") - return - } - - println("Package: ${packageFragment}") - for (descriptor in packageFragment.getMemberScope().getAllDescriptors()) { - println("Member: ${descriptor}") - val doc = getDocumentation(descriptor) - if (doc != null) { - println("Comment:\n${doc.getText()}") - } - println() - } -} +}
\ No newline at end of file |