diff options
author | kyessenov <unknown> | 2010-08-20 00:39:58 +0000 |
---|---|---|
committer | kyessenov <unknown> | 2010-08-20 00:39:58 +0000 |
commit | 02d463afad48835d8143a179c574ce5b246b3e31 (patch) | |
tree | 0fc872c1b5fffee3c8655818c08d59fca8d9112b /Chalice/src/Chalice.scala | |
parent | 495d07eb040d3e04e5266ea6dec3999c4f3e0df1 (diff) |
VS 2010 mode for Chalice: some errors didn't show up in the window because positions were negative
Diffstat (limited to 'Chalice/src/Chalice.scala')
-rw-r--r-- | Chalice/src/Chalice.scala | 21 |
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)
+ }
+ }
}
|