summaryrefslogtreecommitdiff
path: root/sources/scala/tools/nsc/reporters/Reporter.scala
diff options
context:
space:
mode:
authorSean McDirmid <sean.mcdirmid@gmail.com>2005-11-14 16:58:22 +0000
committerSean McDirmid <sean.mcdirmid@gmail.com>2005-11-14 16:58:22 +0000
commitd11a5ec080a8fd0890047a0f7d91b938bc7bf1b6 (patch)
treecb67756886c8568b701f509acab69d559fc833ea /sources/scala/tools/nsc/reporters/Reporter.scala
parentc3a4c7ee6edf7bb442b5beb2d1c97c76b29562d3 (diff)
downloadscala-d11a5ec080a8fd0890047a0f7d91b938bc7bf1b6.tar.gz
scala-d11a5ec080a8fd0890047a0f7d91b938bc7bf1b6.tar.bz2
scala-d11a5ec080a8fd0890047a0f7d91b938bc7bf1b6.zip
Updated NSC to use offsets instead of line/colu...
Updated NSC to use offsets instead of line/column positions.
Diffstat (limited to 'sources/scala/tools/nsc/reporters/Reporter.scala')
-rw-r--r--sources/scala/tools/nsc/reporters/Reporter.scala38
1 files changed, 38 insertions, 0 deletions
diff --git a/sources/scala/tools/nsc/reporters/Reporter.scala b/sources/scala/tools/nsc/reporters/Reporter.scala
new file mode 100644
index 0000000000..3687ea3b66
--- /dev/null
+++ b/sources/scala/tools/nsc/reporters/Reporter.scala
@@ -0,0 +1,38 @@
+/* ____ ____ ____ ____ ______ *\
+** / __// __ \/ __// __ \/ ____/ SOcos COmpiles Scala **
+** __\_ \/ /_/ / /__/ /_/ /\_ \ (c) 2002, LAMP/EPFL **
+** /_____/\____/\___/\____/____/ **
+\* */
+
+// $Id$
+
+package scala.tools.nsc.reporters;
+import scala.tools.nsc.util.Position;
+
+
+/**
+ * This interface provides methods to issue information, warning and
+ * error messages.
+ */
+abstract class Reporter {
+ var verbose : Boolean = false;
+ var nowarn : Boolean = false;
+ var prompt : Boolean = false;
+
+ def prompt(v : Boolean) : Unit = this.prompt = v;
+
+ def warnings() = warningsx;
+ def errors() = errorsx;
+
+ protected var warningsx : Int = 0;
+ protected var errorsx : Int = 0;
+ def resetCounters() : Unit = {
+ warningsx = 0;
+ errorsx = 0;
+ }
+
+ def info(pos : Position, msg : String, force : Boolean) : Unit;
+ def warning(pos : Position, msg : String ) : Unit;
+ def error(pos : Position, msg : String ) : Unit;
+
+}