Up

module Type_with_layout

: sig

S-expressions annotated with relative source positions and comments

#
module Make : functor (Pos : sig
#
type t
#
val sexp_of_t : t -> Type.t
end
) -> sig
#
module type S = sig
#
type t =
# | Atom of Pos.t * string * string option
# | List of Pos.t * t_or_comment list * Pos.t

S-expressions annotated with relative source positions and comments

#
type t_or_comment =
# | Sexp of t
# | Comment of comment
#
type comment =
# | Plain_comment of Pos.t * string
# | Sexp_comment of Pos.t * comment list * t
#
val sexp_of_t : t -> Type.t
#
val sexp_of_comment : comment -> Type.t
#
val sexp_of_t_or_comment : t_or_comment -> Type.t
end
end
#
module Parsed : Make(Src_pos.Absolute).S

parsing produces absolute positions

include Make(Src_pos.Relative).S
#
val relativize : Parsed.t_or_comment -> t_or_comment
end