state property
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 LineScannerState._(this, position, line, column);
Implementation
set state(LineScannerState state) {
if (!identical(state._scanner, this)) {
throw new ArgumentError("The given LineScannerState was not returned by "
"this LineScanner.");
}
super.position = state.position;
_line = state.line;
_column = state.column;
}