Module Cmarkit_base.Textloc

Text locations.

See Cmarkit.Textloc for documentation.

type fpath = string
val file_none : fpath
type byte_pos = int
val byte_pos_none : byte_pos
type line_num = int
val line_num_none : line_num
type line_pos = line_num * byte_pos
val line_pos_first : line_pos
val line_pos_none : line_pos
type t
val none : t
val v : file:fpath -> first_byte:byte_pos -> last_byte:byte_pos -> first_line:line_pos -> last_line:line_pos -> t
val file : t -> fpath
val first_byte : t -> byte_pos
val last_byte : t -> byte_pos
val first_line : t -> line_pos
val last_line : t -> line_pos
val is_none : t -> bool
val is_empty : t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val set_first : t -> first_byte:byte_pos -> first_line:line_pos -> t
val set_last : t -> last_byte:byte_pos -> last_line:line_pos -> t
val to_first : t -> t
val to_last : t -> t
val before : t -> t
val after : t -> t
val span : t -> t -> t
val reloc : first:t -> last:t -> t
val pp_ocaml : Stdlib.Format.formatter -> t -> unit
val pp_gnu : Stdlib.Format.formatter -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit
val pp_dump : Stdlib.Format.formatter -> t -> unit