SourceSpanWithContext class

A class that describes a segment of source text with additional context.

Inheritance
Implementers

Constructors

SourceSpanWithContext(SourceLocation start, SourceLocation end, String text String _context)
Creates a new span from start to end (exclusive) containing text, in the given context. [...]

Properties

context String
Text around the span, which includes the line containing this span.
read-only
end SourceLocation
The end location of this span, exclusive.
final, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
length int
The length of this span, in characters.
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
sourceUrl Uri
The URL of the source (typically a file) of this span. [...]
read-only, inherited
start SourceLocation
The start location of this span.
final, inherited
text String
The source text for this span.
final, inherited

Methods

compareTo(SourceSpan other) int
Compares two spans. [...]
inherited
highlight({dynamic color }) String
Prints the text associated with this span in a user-friendly way. [...]
inherited
message(String message, { dynamic color }) String
Formats message in a human-friendly way associated with this span. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited
union(SourceSpan other) SourceSpan
Creates a new span that's the union of this and other. [...]
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited