Back to API Reference
Struct

ModifierRange

sealed

One materialized range of a modifier: the working unit whose parameters resolve through the cascade and can be taken into ownership.

Remarks

Obtained from GetRanges. The range stays addressable across text edits for as long as the parser preserves its Identity; an edit inside the range retires the identity, and ownership taken on it is released.
public BaseModifier Modifier{ get }

The modifier whose application produced this range.

public RangeIdentity Identity{ get }

Stable source-scoped identity of the entity.

public RangeSegmentId Segment{ get }

The concrete segment of the entity this range covers.

public TextRange Range{ get }

Covered codepoint range in rendered text space.

public string PrimaryValue{ get }

Opaque semantic value emitted by the source, or null.

public string Label{ get }

The #label anchor authored on the range's tag, or null.

public RangeChannel Channel{ get }

Optional project asset used for semantic routing.

public bool IsValid{ get }

Whether this instance addresses a parsed range.

public TextUnitSequence Units()

This range's units of unit granularity, in logical order, each clipped to Range. Enumerating allocates nothing.

public int CountUnits()

How many units of unit granularity this range holds. A unit the range only partly covers counts as one.

public OwnedParameter<TValue> Own()

Takes one parameter of this range into ownership. The owned value composes on the cascade result under composition until the handle is released or the range's identity retires.

public TValue Resolve()

Resolves one parameter of this range: cascade plus owned values.

public override string ToString()