File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
compiler/src/dotty/tools/repl Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments