fastParse method

  1. @override
bool fastParse(
  1. State<I> state
)
override

Implementation

@override
bool fastParse(State<I> state) {
  final failPos = state.failPos;
  final errorCount = state.errorCount;
  final r = p.fastParse(state);
  if (r) {
    return true;
  }

  if (state.canHandleError(failPos, errorCount)) {
    if (state.pos == state.failPos) {
      state.clearErrors(failPos, errorCount);
      state.fail<Object?>(ErrorExpectedTag(tag));
    }
  }

  return false;
}