public LaxError(CodeRange pos, string message, Exception ex) : base(message, ex) { if (pos == null) throw new ArgumentNullException("pos"); Position = pos; }
/// <summary> /// Expand this position to cover the other position. /// </summary> /// <param name="end"></param> public CodeRange Expand2(ICodeRange pos) { var end = pos.CodeRange; var r = new CodeRange() { Start = this.Start, End = this.End, }; if (end.Start < r.Start) r.Start = end.Start; if (r.End < end.End) r.End = end.End; return r; }
public SemanticError(CodeRange pos, string message, CodeRange existing = null) : base(pos, message) { }
public CodeRange(CodeRange a, CodeRange b) { Start = (a.Start < b.Start) ? a.Start : b.Start; End = (a.End > b.End) ? a.End : b.End; }