SourceLocationBase class

A base class for source locations with offset, line, and column known at construction time.

Inheritance

Constructors

SourceLocationBase(int offset, {Object? sourceUrl, int? line, int? column})

Properties

column int
The 0-based column of this location in the source
finalinherited
hashCode int
The hash code for this object.
no setterinherited
line int
The 0-based line of this location in the source.
finalinherited
offset int
The 0-based offset of this location in the source.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sourceUrl Uri?
URL of the source containing this location.
finalinherited
toolString String
Returns a representation of this location in the source:line:column format used by text editors.
no setterinherited

Methods

compareTo(SourceLocation other) int
Compares two locations.
inherited
distance(SourceLocation other) int
Returns the distance in characters between this and other.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pointSpan() SourceSpan
Returns a span that covers only a single point: this location.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited