offsetBy method

SourceRange offsetBy(
  1. SourceRange range,
  2. int offset
)

Return a source range whose length is the same as the given range, but whose offset is the offset of the given range with offset added to it.

Implementation

SourceRange offsetBy(SourceRange range, int offset) {
  return SourceRange(range.offset + offset, range.length);
}