diff options
author | Paul Phillips <paulp@improving.org> | 2011-02-01 08:27:18 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-02-01 08:27:18 +0000 |
commit | ee4e09235afa578a7a33267061179ca338e396c0 (patch) | |
tree | 52ff21a786e84f0a3c47ef5666746591301cc47c /src/compiler/scala/tools/nsc/CompilerCommand.scala | |
parent | d59d7f928d8a71d73d198690ab5816af3be90d6b (diff) | |
download | scala-ee4e09235afa578a7a33267061179ca338e396c0.tar.gz scala-ee4e09235afa578a7a33267061179ca338e396c0.tar.bz2 scala-ee4e09235afa578a7a33267061179ca338e396c0.zip |
Eliminating duplication and trying to outrun ob...
Eliminating duplication and trying to outrun obsolescence in the
exciting world of fsc. No review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/CompilerCommand.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/CompilerCommand.scala | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/compiler/scala/tools/nsc/CompilerCommand.scala b/src/compiler/scala/tools/nsc/CompilerCommand.scala index 86579a4e94..2e3bc32007 100644 --- a/src/compiler/scala/tools/nsc/CompilerCommand.scala +++ b/src/compiler/scala/tools/nsc/CompilerCommand.scala @@ -17,17 +17,21 @@ class CompilerCommand(arguments: List[String], val settings: Settings) { /** file extensions of files that the compiler can process */ lazy val fileEndings = Properties.fileEndings + val (ok, files) = + if (shouldProcessArguments) processArguments + else (true, Nil) + /** The name of the command */ def cmdName = "scalac" - private val helpSyntaxColumnWidth: Int = + private def helpSyntaxColumnWidth: Int = (settings.visibleSettings map (_.helpSyntax.length)) max private def format(s: String): String = if (s.length >= helpSyntaxColumnWidth) s else s + (" " * (helpSyntaxColumnWidth - s.length)) - private val explainAdvanced = "\n" + """ + private def explainAdvanced = "\n" + """ |-- Notes on option parsing -- |Boolean settings are always false unless set. |Where multiple values are accepted, they should be comma-separated. @@ -58,11 +62,7 @@ class CompilerCommand(arguments: List[String], val settings: Settings) { } /** Messages explaining usage and options */ - def usageMsg = - if (cmdName == "fsc") - createUsageMsg("where possible standard", false, st => st.isStandard || st.name == "-shutdown") - else - createUsageMsg("where possible standard", false, _.isStandard) + def usageMsg = createUsageMsg("where possible standard", false, _.isStandard) def xusageMsg = createUsageMsg("Possible advanced", true, _.isAdvanced) def yusageMsg = createUsageMsg("Possible private", true, _.isPrivate) @@ -108,8 +108,4 @@ class CompilerCommand(arguments: List[String], val settings: Settings) { settings.processArguments(expandedArguments, true) } - - val (ok, files) = - if (shouldProcessArguments) processArguments - else (true, Nil) } |