spanFrom method Null safety
- LineScannerState startState,
- [LineScannerState? endState]
Creates a FileSpan representing the source range between startState
and the current position.
Implementation
FileSpan spanFrom(LineScannerState startState, [LineScannerState? endState]) {
final endPosition = endState == null ? position : endState.position;
return _sourceFile.span(startState.position, endPosition);
}