parseAsync method
Implementation
@override
void parseAsync(State<ChunkedData<I>> state, ResultCallback<O> onDone) {
final failPos = state.failPos;
final errorCount = state.errorCount;
void parse() {
p.parseAsync(state, (result) {
if (result != null) {
onDone(result);
} else {
if (state.canHandleError(failPos, errorCount)) {
if (state.pos == state.failPos) {
state.clearErrors(failPos, errorCount);
state.fail<Object?>(ErrorExpectedTag(tag));
}
}
onDone(null);
}
});
}
parse();
}