Table of Contents

Struct ParsePositionDelta

Namespace
NMF.AnyText
Assembly
NMF.AnyText.Core.dll

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

Line int

the line delta

Col int

the column delta

Properties

Col

the column delta

public int Col { readonly get; set; }

Property Value

int

Line

the line delta

public int Line { readonly get; set; }

Property Value

int

Methods

Larger(ParsePositionDelta, ParsePositionDelta)

Calculates the larger of two diffs

public static ParsePositionDelta Larger(ParsePositionDelta delta1, ParsePositionDelta delta2)

Parameters

delta1 ParsePositionDelta

the first delta

delta2 ParsePositionDelta

the 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 ParsePositionDelta

the first delta

delta2 ParsePositionDelta

the 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 ParsePositionDelta

the first delta

delta2 ParsePositionDelta

the 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 ParsePositionDelta

the first delta

delta2 ParsePositionDelta

the second delta

Returns

bool

true, if the first delta is smaller than the second