reset method

void reset()

Clears a completed or suspended parser session at the native reset boundary. A progress halt deliberately does not call this method.

Implementation

void reset() {
  _finishParseLifecycle();
  _activeParseSession = null;
  _activeReusableTree = null;
  _reusableCursor = null;
  _activeGss = null;
  _recoveryPeers = const <_VersionSlot>[];
  _activeRecoverySlotId = null;
  _trace('ts_parser__set_cached_token');
  _tokenCache = null;
  _includedRangeDifferences = const <GeneratedTreeSitterChangedRange>[];
  _retainedInternalTrace = null;
  _activeStreamingInput = null;
  _activeStreamingInputEnded = false;
}