Grace_source_readerSourceA source reader maintains a global table mapping source descriptors to their contents and their line starts.
A source descriptor is a handle for an open source
init () initializes the global source reader table.
clear () clears the global source reader table.
with_reader f runs f with an initialized reader table, clearing it once f returns.
open_source src opens the source, returning its descriptor.
line_starts sd returns the (possibly cached) line starts of the source sd.
length sd returns the length or size in bytes of src.
It is semantically equivalent to Source.length src.
unsafe_get sd i reads the ith byte of the source without performing any bounds checks on i.
slice sd range reads the slice of bytes defined by range.
lines sd returns an iterator over lines in source sd.
lines_in_range sd range returns an iterator over lines in the range in sd.