summaryrefslogtreecommitdiff
path: root/Source/DafnyExtension
diff options
context:
space:
mode:
authorGravatar Clément Pit--Claudel <clement.pitclaudel@live.com>2015-07-31 19:10:14 -0700
committerGravatar Clément Pit--Claudel <clement.pitclaudel@live.com>2015-07-31 19:10:14 -0700
commitc978cd18f8dfba5bfac92af792041c5b4756de5a (patch)
treea3a215f0b7263c5f83f9420cc5d922ac14216093 /Source/DafnyExtension
parentd86d8e6d41394166370bdaee4b02fa1ce6886f42 (diff)
Tiny refactoring in the extension's driver
Diffstat (limited to 'Source/DafnyExtension')
-rw-r--r--Source/DafnyExtension/DafnyDriver.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/DafnyExtension/DafnyDriver.cs b/Source/DafnyExtension/DafnyDriver.cs
index 640ef67c..50d8c2e3 100644
--- a/Source/DafnyExtension/DafnyDriver.cs
+++ b/Source/DafnyExtension/DafnyDriver.cs
@@ -134,7 +134,7 @@ namespace DafnyLanguage
void RecordError(string filename, int line, int col, ErrorCategory cat, string msg, bool isRecycled = false)
{
- _errors.Add(new DafnyError(filename, line, col, cat, msg, _snapshot, isRecycled, null, System.IO.Path.GetFullPath(this._filename) == filename));
+ _errors.Add(new DafnyError(filename, line - 1, col - 1, cat, msg, _snapshot, isRecycled, null, System.IO.Path.GetFullPath(this._filename) == filename));
}
class VSErrors : Dafny.Errors
@@ -144,15 +144,15 @@ namespace DafnyLanguage
this.dd = dd;
}
public override void SynErr(string filename, int line, int col, string msg) {
- dd.RecordError(filename, line - 1, col - 1, ErrorCategory.ParseError, msg);
+ dd.RecordError(filename, line, col, ErrorCategory.ParseError, msg);
count++;
}
public override void SemErr(string filename, int line, int col, string msg) {
- dd.RecordError(filename, line - 1, col - 1, ErrorCategory.ResolveError, msg);
+ dd.RecordError(filename, line, col, ErrorCategory.ResolveError, msg);
count++;
}
public override void Warning(IToken tok, string msg) {
- dd.RecordError(tok.filename, tok.line - 1, tok.col - 1, ErrorCategory.ParseWarning, msg);
+ dd.RecordError(tok.filename, tok.line, tok.col, ErrorCategory.ParseWarning, msg);
}
}
@@ -179,14 +179,14 @@ namespace DafnyLanguage
public override void Error(Bpl.IToken tok, string msg, params object[] args) {
string s = string.Format(msg, args);
- dd.RecordError(tok.filename, tok.line - 1, tok.col - 1, ErrorCategory.ResolveError, s);
+ dd.RecordError(tok.filename, tok.line, tok.col, ErrorCategory.ResolveError, s);
ErrorCount++;
}
public override void Warning(IToken tok, string msg, params object[] args) {
if (reportWarnings) {
string s = string.Format(msg, args);
- dd.RecordError(tok.filename, tok.line - 1, tok.col - 1, ErrorCategory.ResolveWarning, s);
+ dd.RecordError(tok.filename, tok.line, tok.col, ErrorCategory.ResolveWarning, s);
}
}
}