Module Bcfg_txtloc

type t =
  1. | Nowhere
  2. | Simple of {
    1. line : int;
    2. start : int;
    3. stop : int;
    }
  3. | Multiline of {
    1. start : int * int;
    2. stop : int * int;
    }
val pp : Format.formatter -> t -> unit
type 'a with_txtloc = {
  1. txtloc : t;
  2. contents : 'a;
}
val make : t -> 'a -> 'a with_txtloc
val nowhere : 'a -> 'a with_txtloc
val expand : t -> ((int * int) * (int * int)) option
val compress : t -> t
val merge : t -> t -> t
val from_lexbuf : Lexing.lexbuf -> t
val line_start : t -> int
val line_end : t -> int
type line =
  1. | Errored_line of {
    1. err : string;
    2. around : string * string;
    }
  2. | Context_line of string
  3. | Eof of {
    1. errored : bool;
    }
val errored_line : txtloc:t -> line_number:int -> string -> line
val context_line : string -> line
val input_scan_line : in_channel -> int
val input_line : in_channel -> string
val string_line_reader : string -> unit -> string
val lines_around : ?ctx:??? -> txtloc:t -> (unit -> string) -> (int * line) list
val lines_around_txtloc : ?ctx:??? -> txtloc:t -> in_channel -> (int * line) list
val lines_around_txtloc_string : ?ctx:??? -> txtloc:t -> string -> (int * line) list