lastMatch property

Match? lastMatch

The data about the previous match made by the scanner.

If the last match failed, this will be null.

Implementation

Match? get lastMatch {
  // Lazily unset [_lastMatch] so that we avoid extra assignments in
  // character-by-character methods that are used in core loops.
  if (_position != _lastMatchPosition) _lastMatch = null;
  return _lastMatch;
}