FileSpan's context to include the full span text, not just the first line of it.
SourceSpanWithContext: a span that also includes the full line of text that contains the span.
Avoid unintentionally allocating extra objects for internal
SourceSpan.operator== works on arbitrary
This package was extracted from the
source_maps package, but the API has many differences. Among them:
Span has been renamed to
Location has been renamed to
SourceLocation to clarify their purpose and maintain consistency with the package name. Likewise,
SpanException is now
SpanFormatException is not
FixedLocation have been rolled into the
Location classes, respectively.
SourceFile is more aggressive about validating its arguments. Out-of-bounds lines, columns, and offsets will now throw errors rather than be silently clamped.
SourceFile.url now return
Uri objects rather than
Strings. The constructors allow either
SourceFile.getLocationMessage are now
SourceFile.message, respectively. Rather than taking both a
useColor and a
color parameter, they now take a single
color parameter that controls both whether and which color is used.
Span.isIdentifier has been removed. This property doesn't make sense outside of a source map context.
SourceFileSegment has been removed. This class wasn't widely used and was inconsistent in its choice of which parameters were considered relative and which absolute.