34
34
public struct DomRegion : IComparable, IComparable<DomRegion>
36
public readonly static DomRegion Empty = new DomRegion (-1, -1, -1, -1);
36
public readonly static DomRegion Empty = new DomRegion (0, 0, 0, 0);
37
DomLocation start, end;
38
39
public bool IsEmpty {
40
return Start.Line < 0;
41
return Start.Line < 1;
44
45
public DomLocation Start {
47
set { start = value; }
49
50
public DomLocation End {
54
public DomRegion (int startLine, int endLine) : this (startLine, -1, endLine, -1)
58
public DomRegion (int startLine, int startColumn, int endLine, int endColumn) : this ()
60
this.Start = new DomLocation (startLine, startColumn);
61
this.End = new DomLocation (endLine, endColumn);
64
public DomRegion (DomLocation start, DomLocation end) : this (start.Line, start.Column, end.Line, end.Column)
55
public DomRegion (int startLine, int endLine) : this (startLine, 1, endLine, 1)
59
// the call to the empty construtor is required for the windows build
60
public DomRegion (int startLine, int startColumn, int endLine, int endColumn) : this()
62
this.start = new DomLocation (startLine, startColumn);
63
this.end = new DomLocation (endLine, endColumn);
66
public DomRegion (DomLocation start, DomLocation end) : this()
68
72
public static DomRegion FromInvariantString (string invariantString)