diff options
author | wuestholz <unknown> | 2011-12-15 11:33:53 +0100 |
---|---|---|
committer | wuestholz <unknown> | 2011-12-15 11:33:53 +0100 |
commit | 079f0583af3aa16cd46ae47b42150f9483a28027 (patch) | |
tree | 87cddee8a8ce7e8478c0435f6164cbc424bc2305 /Source | |
parent | 3d0f438dfced142ce3c36d15dcb070237014ad8e (diff) |
Dafny: Made sure that error locations refer to the Dafny program, even if the /print option is used.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/Core/Util.cs | 10 | ||||
-rw-r--r-- | Source/DafnyDriver/DafnyDriver.cs | 4 |
2 files changed, 12 insertions, 2 deletions
diff --git a/Source/Core/Util.cs b/Source/Core/Util.cs index d557bc55..6b4c570a 100644 --- a/Source/Core/Util.cs +++ b/Source/Core/Util.cs @@ -167,6 +167,16 @@ namespace Microsoft.Boogie { //base();
}
+ public TokenTextWriter(string filename, bool setTokens)
+ : base() {//BASEMOVE DANGER
+ Contract.Requires(writer != null);
+ Contract.Requires(filename != null);
+ this.filename = filename;
+ this.writer = new StreamWriter(filename);
+ this.setTokens = setTokens;
+ //base();
+ }
+
public TokenTextWriter(string filename, TextWriter writer, bool setTokens)
: base() {//BASEMOVE DANGER
Contract.Requires(writer != null);
diff --git a/Source/DafnyDriver/DafnyDriver.cs b/Source/DafnyDriver/DafnyDriver.cs index 2c2e64e6..c7a929b8 100644 --- a/Source/DafnyDriver/DafnyDriver.cs +++ b/Source/DafnyDriver/DafnyDriver.cs @@ -250,8 +250,8 @@ namespace Microsoft.Dafny CommandLineOptions.Clo.PrintDesugarings = false;
}
using (TokenTextWriter writer = filename == "-" ?
- new TokenTextWriter("<console>", Console.Out) :
- new TokenTextWriter(filename))
+ new TokenTextWriter("<console>", Console.Out, false) :
+ new TokenTextWriter(filename, false))
{
writer.WriteLine("// " + CommandLineOptions.Clo.Version);
writer.WriteLine("// " + CommandLineOptions.Clo.Environment);
|