fastParse method

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

Implementation

@override
bool fastParse(State<StringReader> state) {
  final input = state.input;
  final pos = state.pos;
  while (state.pos < input.length) {
    final c = input.readChar(state.pos);
    if (!(c >= 0x30 && c <= 0x39)) {
      break;
    }

    state.pos += input.count;
  }

  if (state.pos != pos) {
    return true;
  }

  state.fail<Object?>(const ErrorUnexpectedCharacter());
  return false;
}