getRange method

void getRange(
  1. int index
)

Parses the range values from the field at index index. When the range is multiline and is reading the first value, rangeEnd will be -1 and keepRanges will be true.

Implementation

void getRange(int index) {
  final f = getField(index);

  if (f.contains('..')) {
    final parts = f.split('..');
    rangeStart = _parseRune(parts[0]);
    rangeEnd = _parseRune(parts[1]);
    return;
  }

  final ini = _parseRune(f);

  if (index == 0 && fields.length > 1 && fields[1].contains('First>')) {
    rangeStart = ini;
    rangeEnd = -1;
    keepRanges = true;
    return;
  }

  if (index == 0 && fields.length > 1 && fields[1].contains('Last>')) {
    rangeEnd = ini;
    keepRanges = false;
    return;
  }

  rangeStart = rangeEnd = ini;
}