Module Jsont.Meta

Node metadata.

This type keeps information about source JSON text locations and whitespace.

type t

The type for node metadata.

val make : ?ws_before:string -> ?ws_after:string -> Textloc.t -> t

make textloc ~ws_before ~ws_after is metadata with text location textloc.

val none : t

none is metadata for when there is none. Its Textloc.t is Textloc.none and its whitespace is empty.

val textloc : t -> Textloc.t

textloc m is the text location of m.

val ws_before : t -> string

ws_before m is source whitespace before the node.

val ws_after : t -> string

ws_after m is source whitespace after the node.

val with_textloc : t -> Textloc.t -> t

with_textloc m l is m with text location l

val clear_ws : t -> t

clear_ws m is m with ws_before and ws_after set to "".