cfgrammar

Module newlinecache

source

Structsยง

  • Cache newlines from an input. These can be used to turn UTF-8 byte offsets into human-friendly line numbers (and vice versa) without having to store the full input. The cache stores only newline positions, and not the actual user input; the cache can only be filled incrementally using the NewlineCache::feed method.