Skip to content

Commit

Permalink
Reformatted code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeny Gerashchenko authored and Evgeny Gerashchenko committed Mar 22, 2013
1 parent aa74bb6 commit ef391f0
Showing 1 changed file with 17 additions and 17 deletions.
Expand Up @@ -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()

if (line.startsWith("package")) continue

val xform = f(line)
writer.println(xform)
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

val xform = f(line)
writer.println(xform)
}
} finally {
reader.close()
reader.close()
}
} finally {
reader.close()
reader.close()
}
}
} finally {
writer.close()
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit ef391f0

Please sign in to comment.