summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLex Spoon <lex@lexspoon.org>2007-01-24 15:52:43 +0000
committerLex Spoon <lex@lexspoon.org>2007-01-24 15:52:43 +0000
commitf8a6425c9cb5f00cc90e6a2e79db125da31d39bc (patch)
tree44cd790e1e418d629b8abe10219dffbda59d41dd
parent57dd329199add85e8aeec6c655d5d7a509f0fa25 (diff)
downloadscala-f8a6425c9cb5f00cc90e6a2e79db125da31d39bc.tar.gz
scala-f8a6425c9cb5f00cc90e6a2e79db125da31d39bc.tar.bz2
scala-f8a6425c9cb5f00cc90e6a2e79db125da31d39bc.zip
removed the :compile command
-rw-r--r--src/compiler/scala/tools/nsc/Interpreter.scala12
-rw-r--r--src/compiler/scala/tools/nsc/InterpreterLoop.scala10
2 files changed, 1 insertions, 21 deletions
diff --git a/src/compiler/scala/tools/nsc/Interpreter.scala b/src/compiler/scala/tools/nsc/Interpreter.scala
index f9d082fdc5..d1615d2700 100644
--- a/src/compiler/scala/tools/nsc/Interpreter.scala
+++ b/src/compiler/scala/tools/nsc/Interpreter.scala
@@ -204,18 +204,6 @@ class Interpreter(val settings: Settings, reporter: Reporter, out: PrintWriter)
}
}
- /** Compile one source file. */
- def compileFile(filename: String): Unit = {
- val jfile = new File(filename)
- if (!jfile.exists) {
- reporter.error(null, "no such file: " + filename)
- } else {
- val cr = new compiler.Run
- val sf = compiler.getSourceFile(new PlainFile(jfile))
- cr.compileSources(List(sf))
- }
- }
-
/** Compile an nsc SourceFile. Returns true if there are
* no compilation errors, or false othrewise.
*/
diff --git a/src/compiler/scala/tools/nsc/InterpreterLoop.scala b/src/compiler/scala/tools/nsc/InterpreterLoop.scala
index 84f7fc224a..d6ac724685 100644
--- a/src/compiler/scala/tools/nsc/InterpreterLoop.scala
+++ b/src/compiler/scala/tools/nsc/InterpreterLoop.scala
@@ -76,9 +76,8 @@ class InterpreterLoop(in0: BufferedReader, out: PrintWriter) {
def printHelp {
out.println("This is an interpreter for Scala.")
out.println("Type in expressions to have them evaluated.")
- out.println("Type :compile followed by a filename to compile a complete Scala file.")
out.println("Type :help to repeat this message.")
- out.println("Type :load followed by a filename to load interpreter commands.")
+ out.println("Type :load followed by a filename to load a Scala file.")
out.println("Type :replay to reset execution and replay all previous commands.")
out.println("Type :quit to exit the interpreter.")
}
@@ -176,7 +175,6 @@ class InterpreterLoop(in0: BufferedReader, out: PrintWriter) {
val helpRegexp = ":h(e(l(p)?)?)?"
val quitRegexp = ":q(u(i(t)?)?)?"
- val compileRegexp = ":c(o(m(p(i(l(e)?)?)?)?)?)?.*"
val loadRegexp = ":l(o(a(d)?)?)?.*"
val replayRegexp = ":r(e(p(l(a(y)?)?)?)?)?.*"
@@ -186,12 +184,6 @@ class InterpreterLoop(in0: BufferedReader, out: PrintWriter) {
printHelp
else if (line.matches(quitRegexp))
return Pair(false, None)
- else if (line.matches(compileRegexp)) {
- withFile(line)(f => {
- interpreter.compileFile(f)
- shouldReplay = Some(line)
- })
- }
else if (line.matches(loadRegexp)) {
withFile(line)(f => {
interpretAllFrom(f)