parse method
Parses the input and returns a result wrapped in Result if successful,
null
otherwise.
Implementation
@override
Result<String>? parse(State<StringReader> state) {
final input = state.input;
if (state.pos < input.length) {
final c = input.readChar(state.pos);
state.pos += input.count;
return Result(String.fromCharCode(c));
}
return state.fail(ErrorUnexpectedEndOfInput());
}