source_span 1.1.4 source_span: ^1.1.4 copied to clipboard
A library for identifying source spans and locations.
1.1.4 #
- Eliminated dart2js warning about overriding
==
, but nothashCode
.
1.1.3 #
-
FileSpan.compareTo
,FileSpan.==
,FileSpan.union
, andFileSpan.expand
no longer throw exceptions for external implementations ofFileSpan
. -
FileSpan.hashCode
now fully agrees withFileSpan.==
.
1.1.2 #
- Fixed validation in
SourceSpanWithContext
to allow multiple occurrences oftext
withincontext
.
1.1.1 #
- Fixed
FileSpan
's context to include the full span text, not just the first line of it.
1.1.0 #
- Added
SourceSpanWithContext
: a span that also includes the full line of text that contains the span.
1.0.3 #
- Cleanup equality operator to accept any Object rather than just a
SourceLocation
.
1.0.2 #
-
Avoid unintentionally allocating extra objects for internal
FileSpan
operations. -
Ensure that
SourceSpan.operator==
works on arbitraryObject
s.
1.0.1 #
- Use a more compact internal representation for
FileSpan
.
1.0.0 #
This package was extracted from the
source_maps
package, but the
API has many differences. Among them:
-
Span
has been renamed toSourceSpan
andLocation
has been renamed toSourceLocation
to clarify their purpose and maintain consistency with the package name. Likewise,SpanException
is nowSourceSpanException
andSpanFormatException
is notSourceSpanFormatException
. -
FixedSpan
andFixedLocation
have been rolled into theSpan
andLocation
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. -
SourceSpan.sourceUrl
,SourceLocation.sourceUrl
, andSourceFile.url
now returnUri
objects rather thanString
s. The constructors allow eitherString
s orUri
s. -
Span.getLocationMessage
andSourceFile.getLocationMessage
are nowSourceSpan.message
andSourceFile.message
, respectively. Rather than taking both auseColor
and acolor
parameter, they now take a singlecolor
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.