// TODO: The error tracking could be made better to track the full information returned by Dafny public override bool Message(MessageSource source, ErrorLevel level, IToken tok, string msg) { if (base.Message(source, level, tok, msg)) { switch (level) { case ErrorLevel.Error: dd.RecordError(tok.filename, tok.line, tok.col, source == MessageSource.Parser ? ErrorCategory.ParseError : ErrorCategory.ResolveError, msg); break; case ErrorLevel.Warning: dd.RecordError(tok.filename, tok.line, tok.col, source == MessageSource.Parser ? ErrorCategory.ParseWarning : ErrorCategory.ResolveWarning, msg); break; case ErrorLevel.Info: // The AllMessages variable already keeps track of this break; } return(true); } else { return(false); } }
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); ErrorCount++; }
public void Error(Bpl.IToken tok, string msg) { dd.RecordError(tok.filename, tok.line, tok.col, ErrorCategory.VerificationError, msg); }
public override void SynErr(string filename, int line, int col, string msg) { dd.RecordError(filename, line - 1, col - 1, ErrorCategory.ParseError, msg); count++; }