fastParse method

  1. @override
bool fastParse(
  1. ParseState state
)
override

Parses input data passively, with minimal consumption of system resources during parsing.

Returns true if parsing was successful; otherwise returns false.

if(!fastParse(state)) {
  state.fail(err, state.pos);
}

Implementation

@override
bool fastParse(ParseState state) {
  final pos = state.pos;
  final r1 = p.fastParse(state);
  state.pos = pos;
  if (r1) {
    return false;
  }

  return true;
}