SourceRange class

Represents a range in source code.

Constructors

SourceRange({required SourcePosition start, required SourcePosition end, required int offset, required int length})
const
SourceRange.fromNode(AstNode node, LineInfo lineInfo)
Create from AST node and line info.
factory
SourceRange.fromOffset(int offset, int length, LineInfo lineInfo)
Create from offset and length with line info.
factory

Properties

end SourcePosition
End position.
final
hashCode int
The hash code for this object.
no setterinherited
length int
Length of the range.
final
offset int
Offset from beginning of file.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
start SourcePosition
Start position.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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

Constants

zero → const SourceRange
Zero range for unknown locations.