summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLex Spoon <lex@lexspoon.org>2007-06-14 18:33:43 +0000
committerLex Spoon <lex@lexspoon.org>2007-06-14 18:33:43 +0000
commite0f606ac4c88605b7a35d962b6376ecc1119be8f (patch)
tree001f7b2568125142a3530eeae5b356996f152bbe /src
parentd0a8963618d4412370f8ba036d7edfd95153630a (diff)
downloadscala-e0f606ac4c88605b7a35d962b6376ecc1119be8f.tar.gz
scala-e0f606ac4c88605b7a35d962b6376ecc1119be8f.tar.bz2
scala-e0f606ac4c88605b7a35d962b6376ecc1119be8f.zip
factored out the choice of prompt
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/InterpreterLoop.scala6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/InterpreterLoop.scala b/src/compiler/scala/tools/nsc/InterpreterLoop.scala
index b58aa4cf64..3f92a65aa5 100644
--- a/src/compiler/scala/tools/nsc/InterpreterLoop.scala
+++ b/src/compiler/scala/tools/nsc/InterpreterLoop.scala
@@ -103,6 +103,9 @@ class InterpreterLoop(in0: BufferedReader, out: PrintWriter) {
out.println("Type :help for more information.")
}
+ /** Prompt to print when awaiting input */
+ val prompt = "scala> "
+
/** The main read-eval-print loop for the interpreter. It calls
* <code>command()</code> for each line of input, and stops when
* <code>command()</code> returns <code>false</code>.
@@ -111,7 +114,8 @@ class InterpreterLoop(in0: BufferedReader, out: PrintWriter) {
var first = true
while (true) {
if (interactive) {
- out.print("\nscala> ")
+ out.print("\n")
+ out.print(prompt)
out.flush
}
if (first) {