diff options
author | paltherr <paltherr@epfl.ch> | 2004-01-22 08:34:41 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2004-01-22 08:34:41 +0000 |
commit | 5421ec6d056e95608226e9606660d8b66277565b (patch) | |
tree | 51aca92a58737c7987ecf0151799e8bccaa3f378 | |
parent | 8822af3c413ac366369f4b7dfbc52e2f16cc63f3 (diff) | |
download | scala-5421ec6d056e95608226e9606660d8b66277565b.tar.gz scala-5421ec6d056e95608226e9606660d8b66277565b.tar.bz2 scala-5421ec6d056e95608226e9606660d8b66277565b.zip |
- Added flag -nologo
-rw-r--r-- | sources/scala/tools/scalai/InterpreterCommand.java | 8 | ||||
-rw-r--r-- | sources/scala/tools/scalai/InterpreterShell.java | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/sources/scala/tools/scalai/InterpreterCommand.java b/sources/scala/tools/scalai/InterpreterCommand.java index 68f9ed941d..d89378da82 100644 --- a/sources/scala/tools/scalai/InterpreterCommand.java +++ b/sources/scala/tools/scalai/InterpreterCommand.java @@ -23,6 +23,7 @@ public class InterpreterCommand extends CompilerCommand { public final StringOptionParser script; public final BooleanOptionParser interactive; + public final BooleanOptionParser nologo; public final BooleanOptionParser emacs; public final ScalaProgramArgumentParser program; @@ -49,6 +50,10 @@ public class InterpreterCommand extends CompilerCommand { "interactive", "Start interpreter in interactive mode", false); + this.nologo = new BooleanOptionParser(this, + "nologo", "Print no logo at interactive interpreter start", + false); + this.emacs = new BooleanOptionParser(this, "emacs", "Use Emacs editing mode", false); @@ -60,7 +65,8 @@ public class InterpreterCommand extends CompilerCommand { add(0, script); add(1, interactive); - add(2, emacs); + add(2, nologo); + add(3, emacs); add(parsers().indexOf(unknown_options), program); } diff --git a/sources/scala/tools/scalai/InterpreterShell.java b/sources/scala/tools/scalai/InterpreterShell.java index 51e1efa083..1e18d2dbe3 100644 --- a/sources/scala/tools/scalai/InterpreterShell.java +++ b/sources/scala/tools/scalai/InterpreterShell.java @@ -49,6 +49,7 @@ public class InterpreterShell { // Private Fields private final boolean interactive; + private final boolean nologo; private final boolean emacs; private final BufferedReader reader; private final PrintWriter writer; @@ -72,6 +73,7 @@ public class InterpreterShell { PrintWriter writer) { this.interactive = command.interactive.value; + this.nologo = command.nologo.value; this.emacs = command.emacs.value; this.reader = reader; this.writer = writer; @@ -87,7 +89,7 @@ public class InterpreterShell { // Public Methods - shell public void main(String[] files, String script, String main, String[]args){ - if (interactive) showBanner(); + if (interactive && !nologo) showBanner(); if (files.length > 0) load(lfiles = files); global.stop("total"); // !!! remove ? if (global.reporter.errors() == 0 && script != null) eval(script); |