IDL2K: better logging
This commit is contained in:
@@ -14,6 +14,8 @@ fun main(args: Array<String>) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
val repositoryPre = srcDir.walkTopDown().filter { it.isDirectory || it.extension == "idl" }.asSequence().filter { it.isFile }.toList().sortedBy { it.absolutePath }.fold(Repository(emptyMap(), emptyMap(), emptyMap(), emptyMap())) { acc, e ->
|
val repositoryPre = srcDir.walkTopDown().filter { it.isDirectory || it.extension == "idl" }.asSequence().filter { it.isFile }.toList().sortedBy { it.absolutePath }.fold(Repository(emptyMap(), emptyMap(), emptyMap(), emptyMap())) { acc, e ->
|
||||||
|
System.err.flush()
|
||||||
|
System.err.println("Parsing ${e.absolutePath}")
|
||||||
val fileRepository = parseIDL(ANTLRFileStream(e.absolutePath, "UTF-8"))
|
val fileRepository = parseIDL(ANTLRFileStream(e.absolutePath, "UTF-8"))
|
||||||
|
|
||||||
Repository(
|
Repository(
|
||||||
@@ -24,6 +26,8 @@ fun main(args: Array<String>) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
println("Generating...")
|
||||||
|
|
||||||
val repository = repositoryPre.copy(typeDefs = repositoryPre.typeDefs.mapValues { it.value.copy(mapType(repositoryPre, it.value.types)) })
|
val repository = repositoryPre.copy(typeDefs = repositoryPre.typeDefs.mapValues { it.value.copy(mapType(repositoryPre, it.value.types)) })
|
||||||
|
|
||||||
val definitions = mapDefinitions(repository, repository.interfaces.values).map {
|
val definitions = mapDefinitions(repository, repository.interfaces.values).map {
|
||||||
@@ -43,6 +47,8 @@ fun main(args: Array<String>) {
|
|||||||
|
|
||||||
allPackages.forEach { pkg ->
|
allPackages.forEach { pkg ->
|
||||||
File(outDir, pkg + ".kt").bufferedWriter().use { w ->
|
File(outDir, pkg + ".kt").bufferedWriter().use { w ->
|
||||||
|
println("Generating for package $pkg...")
|
||||||
|
|
||||||
w.appendln("/*")
|
w.appendln("/*")
|
||||||
w.appendln(" * Generated file")
|
w.appendln(" * Generated file")
|
||||||
w.appendln(" * DO NOT EDIT")
|
w.appendln(" * DO NOT EDIT")
|
||||||
|
|||||||
Reference in New Issue
Block a user