Skip to content

Commit 6b45cf4

Browse files
committed
wip
1 parent 463b996 commit 6b45cf4

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package dotty.tools.repl
2+
3+
import java.io._
4+
5+
import dotty.tools.dotc.core.Contexts.Context
6+
import dotty.tools.dotc.reporting._
7+
import dotty.tools.dotc.reporting.diagnostic.{Message, MessageContainer}
8+
import dotty.tools.dotc.reporting.diagnostic.messages.Error
9+
import dotty.tools.dotc.util.SourcePosition
10+
11+
object Reporters {
12+
class NoReporter extends Reporter {
13+
override def report(m: MessageContainer)(implicit ctx: Context): Unit = m match {
14+
case _: Error => errorCount += 1
15+
case _ =>
16+
}
17+
override def doReport(m: MessageContainer)(implicit ctx: Context): Unit = ()
18+
}
19+
20+
class ReplReporter(out: PrintStream) extends ConsoleReporter(writer = new PrintWriter(out)) {
21+
override def posStr(pos: SourcePosition, diagnosticLevel: String, message: Message)(implicit ctx: Context): String = ""
22+
}
23+
}

0 commit comments

Comments
 (0)