Source

planck / lib / position.mli

Full commit
open Spotlib.Spot

module type S = sig
  type t
  include Mtypes.Printable with type t := t
  val top : string -> t
  val none : t
end

module None : S with type t = unit

module File : sig
  type t = {
    fname : string; (* file name *) 
    byte : int;     (* in bytes from 0 *)
    line : int;     (* from 1 *)
    column : int;   (* in bytes from 0 *)
  } with sexp

  include S with type t := t

  val add_newlines : t -> int -> t
  val add_columns : t -> int -> t
  val format_detailed : Format.formatter -> t -> unit
end

module Region : sig
  type t = { start : File.t; end_ : File.t; } with sexp
  include S with type t := t
end