range static method

XPathSequence range(
  1. XPathInteger start,
  2. XPathInteger stop
)

Creates a sequence representing an integer range start to stop.

Implementation

static XPathSequence range(XPathInteger start, XPathInteger stop) {
  if (start.value > stop.value) return empty;
  if (stop.value - start.value > BigInt.from(10000000)) {
    throw XPathEvaluationException(
      XPathErrorCode.XPDY0130,
      'Sequence size limit exceeded',
    );
  }
  return _XPathRangeSequence(start.value, stop.value);
}