src/parsimmon.js
function rangeFromIndexAndOffsets(i, before, after, length) {
  return {
    // Guard against the negative upper bound for lines included in the output.
    from: i - before > 0 ? i - before : 0,
    to: i + after > length ? length : i + after
  };
}
function rangeFromIndexAndOffsets(i, before, after, length) {
  return {
    // Guard against the negative upper bound for lines included in the output.
    from: i - before > 0 ? i - before : 0,
    to: i + after > length ? length : i + after
  };
}
function rangeFromIndexAndOffsets ( i , before , after , length ) { return { // Guard against the negative upper bound for lines included in the output. from : i - before > 0 ? i - before : 0 , to : i + after > length ? length : i + after } ; }
Get a range of indexes including `i`-th element and `before` and `after` amount of elements from `arr`.
Get a range of indexes including i - th element and before and after amount of elements from arr .