1
(** S-expressions annotated with relative source positions and comments *)
3
module Make (Pos : sig type t val sexp_of_t : t -> Type.t end) : sig
5
(** S-expressions annotated with relative source positions and comments *)
7
| Atom of Pos.t * string * string option (* optional quoted representation *)
8
| List of Pos.t * t_or_comment list * Pos.t (* left & right paren positions *)
13
| Plain_comment of Pos.t * string (* line or block comment *)
14
| Sexp_comment of Pos.t * comment list * t (* #! position *)
16
val sexp_of_t : t -> Type.t
17
val sexp_of_comment : comment -> Type.t
18
val sexp_of_t_or_comment : t_or_comment -> Type.t
22
module Parsed : Make(Src_pos.Absolute).S (** parsing produces absolute positions *)
24
include Make(Src_pos.Relative).S (* the exposed type contains relative positions *)
26
val relativize : Parsed.t_or_comment -> t_or_comment