Struct ParsePositionDelta
Denotes a delta between parser positions
public record struct ParsePositionDelta : IEquatable<ParsePositionDelta>
- Implements
- Inherited Members
Constructors
ParsePositionDelta(int, int)
Denotes a delta between parser positions
public ParsePositionDelta(int Line, int Col)
Parameters
Properties
Col
the column delta
public int Col { readonly get; set; }
Property Value
Line
the line delta
public int Line { readonly get; set; }
Property Value
Methods
Larger(ParsePositionDelta, ParsePositionDelta)
Calculates the larger of two diffs
public static ParsePositionDelta Larger(ParsePositionDelta delta1, ParsePositionDelta delta2)
Parameters
delta1
ParsePositionDeltathe first delta
delta2
ParsePositionDeltathe second delta
Returns
- ParsePositionDelta
the larger delta of the two deltas
Smaller(ParsePositionDelta, ParsePositionDelta)
Calculates the smaller of two diffs
public static ParsePositionDelta Smaller(ParsePositionDelta delta1, ParsePositionDelta delta2)
Parameters
delta1
ParsePositionDeltathe first delta
delta2
ParsePositionDeltathe second delta
Returns
- ParsePositionDelta
the smaller delta of the two deltas
Operators
operator >(ParsePositionDelta, ParsePositionDelta)
Determines whether the first delta is larger than the second
public static bool operator >(ParsePositionDelta delta1, ParsePositionDelta delta2)
Parameters
delta1
ParsePositionDeltathe first delta
delta2
ParsePositionDeltathe second delta
Returns
- bool
true, if the first delta is larger than the second
operator <(ParsePositionDelta, ParsePositionDelta)
Determines whether the first delta is smaller than the second
public static bool operator <(ParsePositionDelta delta1, ParsePositionDelta delta2)
Parameters
delta1
ParsePositionDeltathe first delta
delta2
ParsePositionDeltathe second delta
Returns
- bool
true, if the first delta is smaller than the second