diff options
author | Martin Odersky <odersky@gmail.com> | 2008-05-20 20:31:20 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2008-05-20 20:31:20 +0000 |
commit | 00e18ddfec3d3d592b5a140af3a73e4c06a135fe (patch) | |
tree | 0142cbb81eafb673eecb1ec8ace361d89818afd0 /src/compiler/scala/tools/nsc/CompilerCommand.scala | |
parent | 2c7e43ae7adc82438924c2dba9fd725c216c3048 (diff) | |
download | scala-00e18ddfec3d3d592b5a140af3a73e4c06a135fe.tar.gz scala-00e18ddfec3d3d592b5a140af3a73e4c06a135fe.tar.bz2 scala-00e18ddfec3d3d592b5a140af3a73e4c06a135fe.zip |
1) Fix in backend to print meaningful filenames...
1) Fix in backend to print meaningful filenames (previously it was
"[wrote DataOutputStream@6747]" 2) Treat java varargs as Scala varargs
3) Allow parsing of Java source files
Diffstat (limited to 'src/compiler/scala/tools/nsc/CompilerCommand.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/CompilerCommand.scala | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/CompilerCommand.scala b/src/compiler/scala/tools/nsc/CompilerCommand.scala index e005e0208e..9ad0bb2539 100644 --- a/src/compiler/scala/tools/nsc/CompilerCommand.scala +++ b/src/compiler/scala/tools/nsc/CompilerCommand.scala @@ -20,7 +20,7 @@ class CompilerCommand(arguments: List[String], val settings: Settings, val cmdName = "scalac" /** The file extension of files that the compiler can process */ - def fileEnding = Properties.fileEndingString //todo: lazy val + lazy val fileEnding = Properties.fileEndingString private val helpSyntaxColumnWidth: Int = Iterable.max(settings.allSettings map (_.helpSyntax.length)) @@ -92,10 +92,11 @@ class CompilerCommand(arguments: List[String], val settings: Settings, ok = false } } - } else if ((settings.script.value != "") || args.head.endsWith(fileEnding)) { + } else if ((settings.script.value != "") || + (fileEnding.split("\\|") exists (args.head.endsWith(_)))) { fs = args.head :: fs args = args.tail - } else if (args.head.length == 0) {//quick fix + } else if (args.head.length == 0) {//quick fix [martin: for what?] args = args.tail } else { error("don't know what to do with " + args.head) |