spanFrom method

FileSpan spanFrom (LineScannerState startState, [ LineScannerState endState ])

Creates a FileSpan representing the source range between startState and the current position.

Implementation

FileSpan spanFrom(LineScannerState startState, [LineScannerState endState]) {
  var endPosition = endState == null ? position : endState.position;
  return _sourceFile.span(startState.position, endPosition);
}