From f8a6425c9cb5f00cc90e6a2e79db125da31d39bc Mon Sep 17 00:00:00 2001 From: Lex Spoon Date: Wed, 24 Jan 2007 15:52:43 +0000 Subject: removed the :compile command --- src/compiler/scala/tools/nsc/Interpreter.scala | 12 ------------ src/compiler/scala/tools/nsc/InterpreterLoop.scala | 10 +--------- 2 files changed, 1 insertion(+), 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) -- cgit v1.2.3