Overrides the Location module of OCaml
There are less functions in this module. However the API should be more stable than the Location module of OCaml.
type t
= Ppxlib__.Import.location
=
{
loc_start : Lexing.position; |
loc_end : Lexing.position; |
loc_ghost : Ppxlib__.Import.bool; |
}
val raise_errorf : ?loc:t ‑> ('a, Caml.Format.formatter, Ppxlib__.Import.unit, 'b) Ppxlib__.Import.format4 ‑> 'a
Raise a located error. The exception is caught by driver and handled appropriately
val of_lexbuf : Lexing.lexbuf ‑> t
Return the location corresponding to the last matched regular expression
val report_exception : Caml.Format.formatter ‑> Ppxlib__.Import.exn ‑> Ppxlib__.Import.unit
Report an exception on the given formatter
val print : Caml.Format.formatter ‑> t ‑> Ppxlib__.Import.unit
Prints File "...", line ..., characters ...-...:
exception
Error of Error.t