peek method

StreamChar peek({
  1. int? offset,
})

Implementation

StreamChar peek({int? offset}) {
  final int idx = curr + (offset ?? 0);
  if (idx >= content.length) {
    return StreamChar.eof();
  }

  return StreamChar(content[idx], StreamPos(col, line));
}