RangeFactory class
A factory used to create instances of SourceRange based on various
syntactic and semantic entities.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
argumentRange(
ArgumentList argumentList, int lower, int upper, bool forDeletion) → SourceRange -
Return a source range that covers all of the arguments in the
argumentListbetween thelowerandupperindices, inclusive. The flagforDeletioncontrols whether a comma between the given indices and the neighboring arguments should be included in the range. If the flag istrue, then the range can be deleted to delete the covered arguments and leave a valid argument list. If the flag isfalse, then the range can be replaced with different argument values. -
deletionRange(
AstNode node, {Token? overrideEnd}) → SourceRange -
Return the deletion range of the
node, considering the spaces and comments before and after it. -
diagnostic(
Diagnostic diagnostic) → SourceRange -
A source range that covers the same range as the given
diagnostic. -
endEnd(
SyntacticEntity leftEntity, SyntacticEntity rightEntity) → SourceRange -
Return a source range that starts at the end of
leftEntityand ends at the end ofrightEntity. -
endLength(
SyntacticEntity entity, int length) → SourceRange -
Return a source range that starts at the end of
entityand has the givenlength. -
endStart(
SyntacticEntity leftEntity, SyntacticEntity rightEntity) → SourceRange -
Return a source range that starts at the end of
leftEntityand ends at the start ofrightEntity. -
entity(
SyntacticEntity node) → SourceRange -
Return a source range that covers the same range as the given
node. -
error(
Diagnostic d) → SourceRange -
fragmentName(
Fragment fragment) → SourceRange? -
Returns a source range that covers the name of the given
fragment. -
node(
AstNode node) → SourceRange -
Return a source range that covers the same range as the given
node. -
nodeInList<
T extends AstNode> (NodeList< T> list, T item) → SourceRange -
Return a source range that covers the given
item(including a leading or trailing comma as appropriate) in the containinglist. -
nodes(
List< AstNode> nodes) → SourceRange -
Return a source range that covers all of the given
nodes(that is, from the start of the first node to the end of the last node. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
offsetBy(
SourceRange range, int offset) → SourceRange -
Return a source range whose length is the same as the given
range, but whose offset is the offset of the givenrangewithoffsetadded to it. -
startEnd(
SyntacticEntity leftEntity, SyntacticEntity rightEntity) → SourceRange -
Return a source range that starts at the start of
leftEntityand ends at the end ofrightEntity. -
startLength(
SyntacticEntity entity, int length) → SourceRange -
Return a source range that starts at the start of
entityand has a length oflength. -
startOffsetEndOffset(
int startOffset, int endOffset) → SourceRange -
Return a source range that starts at the given
startOffsetand ends at the givenendOffset. -
startOffsetLength(
int startOffset, int length) → SourceRange -
Return a source range that starts at the given
startOffset, and has the givenlength. -
startOffsetStart(
int startOffset, SyntacticEntity rightEntity) → SourceRange -
Returns the source range that starts at
startOffsetand ends at the start ofrightEntity. -
startStart(
SyntacticEntity leftEntity, SyntacticEntity rightEntity) → SourceRange -
Return a source range that starts at the start of
leftEntityand ends at the start ofrightEntity. -
token(
Token token) → SourceRange -
Return a source range that covers the same range as the given
token. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited