diff options
author | Paul Phillips <paulp@improving.org> | 2011-03-31 05:58:01 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-03-31 05:58:01 +0000 |
commit | c81e94b5dd39cf86abd0145fc93e0999f57a548c (patch) | |
tree | b9f2f6203b97a1ca2fd55991b2aa7a5c37ef65c3 /src/compiler/scala/tools/nsc/MainGenericRunner.scala | |
parent | 56b7e67051af95bdc7b21b3a7d9333af40ee2e7f (diff) | |
download | scala-c81e94b5dd39cf86abd0145fc93e0999f57a548c.tar.gz scala-c81e94b5dd39cf86abd0145fc93e0999f57a548c.tar.bz2 scala-c81e94b5dd39cf86abd0145fc93e0999f57a548c.zip |
Some minor sensibility improvements to previous...
Some minor sensibility improvements to previous patch, and tearing out
some obsolete pieces of scalap. No review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/MainGenericRunner.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/MainGenericRunner.scala | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/compiler/scala/tools/nsc/MainGenericRunner.scala b/src/compiler/scala/tools/nsc/MainGenericRunner.scala index 7ead4cce4a..f2d4bacb35 100644 --- a/src/compiler/scala/tools/nsc/MainGenericRunner.scala +++ b/src/compiler/scala/tools/nsc/MainGenericRunner.scala @@ -19,7 +19,7 @@ import GenericRunnerCommand._ * sources for the code to run: pre-compiled code, a script file, * or interactive entry. */ -object MainGenericRunner { +class MainGenericRunner { def errorFn(ex: Throwable): Boolean = { ex.printStackTrace() false @@ -29,11 +29,6 @@ object MainGenericRunner { false } - def main(args: Array[String]) { - if (!process(args)) - sys.exit(1) - } - def process(args: Array[String]): Boolean = { val command = new GenericRunnerCommand(args.toList, (x: String) => errorFn(x)) import command.{ settings, howToRun, thingToRun } @@ -88,3 +83,10 @@ object MainGenericRunner { } } } + +object MainGenericRunner extends MainGenericRunner { + def main(args: Array[String]) { + if (!process(args)) + sys.exit(1) + } +} |