protected AbstractMessage(AbstractMessage aMsg)
 {
     this.code = aMsg.code;
     this.location = aMsg.location;
     this.message = aMsg.message;
     this.extra_info = aMsg.extra_info;
 }
 public ErrorMessage(AbstractMessage otherMsg)
     : base(otherMsg)
 {
 }
 public virtual void Print(AbstractMessage msg, bool showFullPath)
 {
     if(msg.IsWarning)
         ++WarningsCount;
     else
         ++ErrorsCount;
 }
        protected void Print(AbstractMessage msg, TextWriter output, bool showFullPath)
        {
            StringBuilder txt = new StringBuilder();
            if(!msg.Location.IsEmpty){
                if(showFullPath)
                    txt.Append(msg.Location.ToString());
                else
                    txt.Append(msg.Location.ToString());

                txt.Append(" ");
            }

            txt.AppendFormat("{0} BVE5{1:0000}: {2}", msg.MessageType, msg.Code, msg.Text);

            if(!msg.IsWarning)
                output.WriteLine(FormatText(txt.ToString()));
            else
                output.WriteLine(txt.ToString());

            if(msg.RelatedSymbols != null){
                foreach(string s in msg.RelatedSymbols)
                    output.WriteLine(s + msg.MessageType + ")");
            }
        }
 public override void Print(AbstractMessage msg, bool showFullPath = false)
 {
     base.Print(msg, showFullPath);
     var new_error = new Error(msg.IsWarning ? ErrorType.Warning : ErrorType.Error, msg.Text,
                              new DomRegion(file_name, msg.Location.Line, msg.Location.Column));
     Errors.Add(new_error);
 }