From 00e18ddfec3d3d592b5a140af3a73e4c06a135fe Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 20 May 2008 20:31:20 +0000 Subject: 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 --- src/compiler/scala/tools/nsc/CompilerCommand.scala | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/compiler/scala/tools/nsc/CompilerCommand.scala') 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) -- cgit v1.2.3