diff options
author | Lex Spoon <lex@lexspoon.org> | 2007-06-12 14:35:36 +0000 |
---|---|---|
committer | Lex Spoon <lex@lexspoon.org> | 2007-06-12 14:35:36 +0000 |
commit | 84bed4cf438dc969089a057a4791d8bf9f3efa40 (patch) | |
tree | 35f47f768dfa8f9bc287c2839fdb65049f965236 /src/compiler | |
parent | f1eb98a9ec70d6327227a736ea07bcf6b37656bd (diff) | |
download | scala-84bed4cf438dc969089a057a4791d8bf9f3efa40.tar.gz scala-84bed4cf438dc969089a057a4791d8bf9f3efa40.tar.bz2 scala-84bed4cf438dc969089a057a4791d8bf9f3efa40.zip |
factored out the command name and compiler comm...
factored out the command name and compiler command name, so that
subclasses can override them
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/GenericRunnerCommand.scala | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/GenericRunnerCommand.scala b/src/compiler/scala/tools/nsc/GenericRunnerCommand.scala index 3c08c603af..cf5e89fdf8 100644 --- a/src/compiler/scala/tools/nsc/GenericRunnerCommand.scala +++ b/src/compiler/scala/tools/nsc/GenericRunnerCommand.scala @@ -12,6 +12,12 @@ class GenericRunnerCommand(allargs: List[String], error: String => Unit) { def this(allargs: List[String]) = this(allargs, str => Console.println("Error: " + str)) + /** name of the command */ + val cmdName = "scala" + + /** name of the associated compiler command */ + val compCmdName = "scalac" + /** Settings specified by this command */ val settings = new GenericRunnerSettings(error) @@ -46,12 +52,12 @@ class GenericRunnerCommand(allargs: List[String], error: String => Unit) { parseArguments val usageMessage = { - "scala [ <option> ]... [<torun> <arguments>]\n" + + cmdName + " [ <option> ]... [<torun> <arguments>]\n" + "\n" + - "All options to scalac are allowed. See scalac -help.\n" + + "All options to "+compCmdName+" are allowed. See "+compCmdName+" -help.\n" + "\n" + "<torun>, if present, is an object or script file to run.\n" + - "If no <torun> is present, run an interactive interpreter.\n" + + "If no <torun> is present, run an interactive shell.\n" + "\n" + "Option -howtorun allows explicitly specifying how to run <torun>:\n" + " script: it is a script file\n" + |