parse method

  1. @override
Tuple1<int>? parse(
  1. ParseInput<String> input,
  2. ParseState state
)
override

Implementation

@override
Tuple1<int>? parse(ParseInput<String> input, ParseState state) {
  final c = input.ch;
  if (c >= 0x30 && c <= 0x39) {
    input.pos++;
    return Tuple1(c);
  }

  state.fail(error, input.pos);
}