aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-05-12 15:31:20 +0200
committerMartin Odersky <odersky@gmail.com>2013-05-12 15:31:20 +0200
commit18795cad3cdd38106fc081c6573f7eafd34c68ab (patch)
tree537c577560cebb7ec137541e1346d3131f8a3814
parentaad2d3a71f65e1b542bbfafbf387394331a270ee (diff)
downloaddotty-18795cad3cdd38106fc081c6573f7eafd34c68ab.tar.gz
dotty-18795cad3cdd38106fc081c6573f7eafd34c68ab.tar.bz2
dotty-18795cad3cdd38106fc081c6573f7eafd34c68ab.zip
Cleanup printing of positions.
-rw-r--r--src/dotty/tools/dotc/reporting/ConsoleReporter.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/reporting/ConsoleReporter.scala b/src/dotty/tools/dotc/reporting/ConsoleReporter.scala
index 9f191afac..998ed2b62 100644
--- a/src/dotty/tools/dotc/reporting/ConsoleReporter.scala
+++ b/src/dotty/tools/dotc/reporting/ConsoleReporter.scala
@@ -28,18 +28,18 @@ class ConsoleReporter(
printMessage(pos.lineContents.stripLineEnd)
def printColumnMarker(pos: SourcePosition) =
- if (pos.exists) { writer.print(" " * (pos.column - 1) + "^ ") }
+ if (pos.exists) { printMessage(" " * (pos.column - 1) + "^") }
/** Prints the message. */
def printMessage(msg: String) { writer.print(msg + "\n"); writer.flush() }
/** Prints the message with the given position indication. */
def printMessage(msg: String, pos: SourcePosition)(implicit ctx: Context) {
+ printMessage(s"${if (pos.exists) s"$pos: " else ""}$msg")
if (pos.exists) {
printSourceLine(pos)
printColumnMarker(pos)
}
- printMessage(msg)
}
def printMessage(msg: String, severity: Severity, pos: SourcePosition)(implicit ctx: Context) {
@@ -55,7 +55,7 @@ class ConsoleReporter(
override def report(msg: String, severity: Severity, pos: SourcePosition)(implicit ctx: Context) {
if (severity != ERROR || count(severity) <= ErrorLimit)
printMessage(msg, severity, pos)
- if (ctx.settings.prompt.value) displayPrompt()
+ if (severity != INFO && ctx.settings.prompt.value) displayPrompt()
}
def displayPrompt(): Unit = {