Djot.Textloc
type byte_pos = int
Zero-based.
type line_pos = int * byte_pos
A one-based line number and the byte position of the line's first byte.
type t
val first_byte : t -> byte_pos
val last_byte : t -> byte_pos
Inclusive.
val first_line : t -> line_pos
val last_line : t -> line_pos
val none : t
val is_none : t -> bool
val is_empty : t -> bool
last_byte is first_byte - 1.
last_byte
first_byte - 1
val make : first_byte:byte_pos -> last_byte:byte_pos -> first_line:line_pos -> last_line:line_pos -> t
val reloc : first:t -> last:t -> t
The range from first's first byte to last's last byte
first
last
val pp : Stdlib.Format.formatter -> t -> unit