intersects method

bool intersects(
  1. SourceRange? otherRange
)

Return true if this source range intersects the otherRange.

Implementation

bool intersects(SourceRange? otherRange) {
  if (otherRange == null) {
    return false;
  }
  if (end <= otherRange.offset) {
    return false;
  }
  if (offset >= otherRange.end) {
    return false;
  }
  return true;
}