Reformatted code.

This commit is contained in:
Evgeny Gerashchenko
2013-03-20 18:30:54 +04:00
parent aa74bb6611
commit ef391f0642
@@ -30,23 +30,23 @@ $COMMON_AUTOGENERATED_WARNING
// //
""") """)
println("Parsing $file and writing $outFile") println("Parsing $file and writing $outFile")
val reader = FileReader(file).buffered() val reader = FileReader(file).buffered()
try { try {
// TODO ideally we'd use a filterNot() here :) // TODO ideally we'd use a filterNot() here :)
val iter = reader.lineIterator() val iter = reader.lineIterator()
while (iter.hasNext()) { while (iter.hasNext()) {
val line = iter.next() val line = iter.next()
if (line.startsWith("package")) continue if (line.startsWith("package")) continue
val xform = f(line) val xform = f(line)
writer.println(xform) writer.println(xform)
}
} finally {
reader.close()
reader.close()
} }
} finally {
reader.close()
reader.close()
}
} }
} finally { } finally {
writer.close() writer.close()
@@ -111,7 +111,7 @@ fun main(args: Array<String>) {
fun String.flat() = this.replaceAll(" ", "") 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()}") println("Generating file: ${file.getPath()}")
val its = FileWriter(file) val its = FileWriter(file)