Reformatted code.
This commit is contained in:
@@ -30,23 +30,23 @@ $COMMON_AUTOGENERATED_WARNING
|
||||
//
|
||||
""")
|
||||
|
||||
println("Parsing $file and writing $outFile")
|
||||
val reader = FileReader(file).buffered()
|
||||
try {
|
||||
// TODO ideally we'd use a filterNot() here :)
|
||||
val iter = reader.lineIterator()
|
||||
while (iter.hasNext()) {
|
||||
val line = iter.next()
|
||||
println("Parsing $file and writing $outFile")
|
||||
val reader = FileReader(file).buffered()
|
||||
try {
|
||||
// TODO ideally we'd use a filterNot() here :)
|
||||
val iter = reader.lineIterator()
|
||||
while (iter.hasNext()) {
|
||||
val line = iter.next()
|
||||
|
||||
if (line.startsWith("package")) continue
|
||||
if (line.startsWith("package")) continue
|
||||
|
||||
val xform = f(line)
|
||||
writer.println(xform)
|
||||
val xform = f(line)
|
||||
writer.println(xform)
|
||||
}
|
||||
} finally {
|
||||
reader.close()
|
||||
reader.close()
|
||||
}
|
||||
} finally {
|
||||
reader.close()
|
||||
reader.close()
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
writer.close()
|
||||
@@ -111,7 +111,7 @@ fun main(args: Array<String>) {
|
||||
|
||||
fun String.flat() = this.replaceAll(" ", "")
|
||||
|
||||
fun List<GenericFunction>.writeTo(file : File, builder : GenericFunction.() -> String) {
|
||||
fun List<GenericFunction>.writeTo(file: File, builder: GenericFunction.() -> String) {
|
||||
println("Generating file: ${file.getPath()}")
|
||||
val its = FileWriter(file)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user