SpanScanner.within constructor

SpanScanner.within(
  1. FileSpan span
)

Creates a new SpanScanner that scans within span.

This scans through span.text, but emits new spans from [span].file in their appropriate relative positions. The [string] field contains only [span].text`, and position, line, and column are all relative to the span.

Implementation

factory SpanScanner.within(FileSpan span) = RelativeSpanScanner;