state property
override
The scanner's state, including line and column information.
This can be used to efficiently save and restore the state of the scanner when backtracking. A given LineScannerState is only valid for the LineScanner that created it.
This does not include the scanner's match information.
Implementation
LineScannerState get state => new _SpanScannerState(this, position);
override
Implementation
set state(LineScannerState state) {
if (state is! _SpanScannerState ||
!identical((state as _SpanScannerState)._scanner, this)) {
throw new ArgumentError("The given LineScannerState was not returned by "
"this LineScanner.");
}
this.position = state.position;
}