summaryrefslogtreecommitdiff
path: root/Chalice/src/Chalice.scala
diff options
context:
space:
mode:
Diffstat (limited to 'Chalice/src/Chalice.scala')
-rw-r--r--Chalice/src/Chalice.scala21
1 files changed, 10 insertions, 11 deletions
diff --git a/Chalice/src/Chalice.scala b/Chalice/src/Chalice.scala
index 43b3a330..0b2d43c5 100644
--- a/Chalice/src/Chalice.scala
+++ b/Chalice/src/Chalice.scala
@@ -9,6 +9,7 @@ import java.io.InputStreamReader
import java.io.File
import java.io.FileWriter
import scala.util.parsing.input.Position
+import scala.util.parsing.input.NoPosition
import collection.mutable.ListBuffer
object Chalice {
@@ -36,16 +37,6 @@ object Chalice {
var boogiePath = "C:\\boogie\\Binaries\\Boogie.exe"
val inputs = new ListBuffer[String]()
var printProgram = false
-
- def ReportError(pos: Position, msg: String) = {
- if (vsMode) {
- val r = pos.line - 1;
- val c = pos.column - 1;
- Console.out.println(r + "," + c + "," + r + "," + (c+5) + ":" + msg);
- } else {
- Console.err.println(pos + ": " + msg)
- }
- }
var doTypecheck = true
var doTranslate = true
var boogieArgs = " ";
@@ -196,6 +187,14 @@ object Chalice {
def CommandLineError(msg: String, help: String) = {
Console.err.println("Error: " + msg)
- Console.err.println(help);
}
+
+ def ReportError(pos: Position, msg: String) = {
+ if (vsMode) {
+ val (r,c) = (pos.line, pos.column)
+ Console.out.println(r + "," + c + "," + r + "," + (c+5) + ":" + msg);
+ } else {
+ Console.err.println(pos + ": " + msg)
+ }
+ }
}