Module Location


module Location: sig .. end
Locations to keep track of position of code in original source file.

type t 
Type of locations.
module Map: Map.S  with type key = t
Maps from locations.
val dummy : t
Dummy location.
val beg_p : t -> t
beg_p l returns a location representing the point at beginning of l.
val end_p : t -> t
end_p l returns a location representing the point at the end of l.
val filename : string Pervasives.ref
The filename which will be registered in all subsequent calls to get_current*.
val get_current : unit -> t
get_current () returns current location in file filename during parsing. To be called in a parser rule.
val get_current_from_lexbuf : Lexing.lexbuf -> t
get_current_from_lexbuf lexbuf returns current location of lexer in file filename. Useful for lexing errors.
val fprint : Format.formatter -> t -> unit
Outputs a location.