jon.recoil.org

Module Ocaml_parsing.Location_aux

type t = Ocaml_parsing.Location.t = {
  1. loc_start : Stdlib.Lexing.position;
  2. loc_end : Stdlib.Lexing.position;
  3. loc_ghost : bool;
}

compare l1 l2 compares start positions, if equal compares end positions

Return the smallest location covered by both arguments, ghost if both are ghosts

Like location_union, but keep loc_ghost'ness of first argument

included ~into:parent child returns true if child is included in parent. Otherwise returns false.

overlap_with_range (pos_start, pos_end) loc returns true if loc overlap with the range defined by pos_start and pos_end.

val prepare_errors : exn list -> Ocaml_parsing.Location.error list

Filter valid errors, log invalid ones

Dump

val print : unit -> Ocaml_parsing.Location_aux.t -> string
val print_loc : (unit -> 'a -> string) -> unit -> 'a Ocaml_parsing.Location.loc -> string
val is_relaxed_location : string Ocaml_parsing.Location.loc -> bool