aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Generation/FileGenerator.kt7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Generation/FileGenerator.kt b/src/Generation/FileGenerator.kt
index b174368f..105c14e6 100644
--- a/src/Generation/FileGenerator.kt
+++ b/src/Generation/FileGenerator.kt
@@ -5,13 +5,14 @@ import java.io.File
public class FileGenerator(val signatureGenerator: SignatureGenerator,
val locationService: LocationService,
val formatService: FormatService) {
+
public fun generate(node: DocumentationNode) {
val location = locationService.location(node)
val file = location.file.appendExtension(formatService.extension)
file.getParentFile()?.mkdirs()
file.writeText(formatService.format(node), defaultCharset)
- val items = node.members.sortBy { it.name }
- for (child in items)
- generate(child)
+ val members = node.members.sortBy { it.name }
+ for (member in members)
+ generate(member)
}
} \ No newline at end of file