diff options
author | Paul Phillips <paulp@improving.org> | 2011-05-29 18:41:30 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-05-29 18:41:30 +0000 |
commit | c5bd18d46e636b3d8eae603cd0bfe6aad63c17be (patch) | |
tree | 64e6ad92da8f367e74caec062d673755c250e3e8 /src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala | |
parent | 94e1965b645475c3c7bfb3d1e3b4743fb23808d7 (diff) | |
download | scala-c5bd18d46e636b3d8eae603cd0bfe6aad63c17be.tar.gz scala-c5bd18d46e636b3d8eae603cd0bfe6aad63c17be.tar.bz2 scala-c5bd18d46e636b3d8eae603cd0bfe6aad63c17be.zip |
Fixing an interpreter output regression and upd...
Fixing an interpreter output regression and updated repl debugging and
tracing code. No review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala b/src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala index b7baea57fc..8b387823ff 100644 --- a/src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala +++ b/src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala @@ -18,7 +18,7 @@ class JLineCompletion(val intp: IMain) extends Completion with CompletionOutput import global._ import definitions.{ PredefModule, RootClass, AnyClass, AnyRefClass, ScalaPackage, JavaLangPackage } type ExecResult = Any - import intp.{ DBG, debugging, afterTyper } + import intp.{ debugging, afterTyper } // verbosity goes up with consecutive tabs private var verbosity: Int = 0 @@ -325,7 +325,7 @@ class JLineCompletion(val intp: IMain) extends Completion with CompletionOutput // This is jline's entry point for completion. override def complete(buf: String, cursor: Int): Candidates = { verbosity = if (isConsecutiveTabs(buf, cursor)) verbosity + 1 else 0 - DBG("\ncomplete(%s, %d) last = (%s, %d), verbosity: %s".format(buf, cursor, lastBuf, lastCursor, verbosity)) + repldbg("\ncomplete(%s, %d) last = (%s, %d), verbosity: %s".format(buf, cursor, lastBuf, lastCursor, verbosity)) // we don't try lower priority completions unless higher ones return no results. def tryCompletion(p: Parsed, completionFunction: Parsed => List[String]): Option[Candidates] = { @@ -338,7 +338,7 @@ class JLineCompletion(val intp: IMain) extends Completion with CompletionOutput val advance = commonPrefix(winners) lastCursor = p.position + advance.length lastBuf = (buf take p.position) + advance - DBG("tryCompletion(%s, _) lastBuf = %s, lastCursor = %s, p.position = %s".format( + repldbg("tryCompletion(%s, _) lastBuf = %s, lastCursor = %s, p.position = %s".format( p, lastBuf, lastCursor, p.position)) p.position } @@ -369,7 +369,7 @@ class JLineCompletion(val intp: IMain) extends Completion with CompletionOutput } catch { case ex: Exception => - DBG("Error: complete(%s, %s) provoked %s".format(buf, cursor, ex)) + repldbg("Error: complete(%s, %s) provoked %s".format(buf, cursor, ex)) Candidates(cursor, List(" ", "<completion error: " + ex.getMessage + ">")) } } |