reset method

void reset(
  1. int pos
)

Implementation

void reset(int pos) {
  if (pos == null) {
    throw new ArgumentError('pos: $pos');
  }
  if (pos < 0 || pos > _inputLen) {
    throw new RangeError('pos');
  }
  _cursor = pos;
  _cache = new List<Map<int, List>>.filled(252, {});
  _cachePos = new List<int>.filled(252, -1);
  _cacheable = new List<bool>.filled(252, false);
  _ch = -1;
  _errors = <GrammarParserError>[];
  _expected = <String>[];
  _failurePos = -1;
  _startPos = pos;
  _testing = -1;
  _token = null;
  _tokenStart = null;
  if (_cursor < _inputLen) {
    _ch = _input[_cursor];
  }
  success = true;
}