reset method

dynamic reset(
  1. dynamic data, {
  2. dynamic state,
})

Implementation

reset(data, {state}) {
  this.buffer = data;
  this.index = 0;
  this.line = state != null ? state.line : 1;
  this.lastLineBreak = state != null ? -state.col : 0;
}