Commit c430a56d authored by POTTIER Francois's avatar POTTIER Francois

New function [Positions.decompose].

parent 4de51f68
......@@ -29,6 +29,9 @@ let value { value = v } =
let position { position = p } =
p
let decompose { value; position } =
(value, position)
let with_pos p v =
{
value = v;
......
......@@ -35,6 +35,9 @@ val value: 'a located -> 'a
decorated value [dv]. *)
val position: 'a located -> t
(** [decompose dv] returns a pair of the value and position. *)
val decompose: 'a located -> 'a * t
(** [with_pos p v] decorates [v] with a position [p]. *)
val with_pos : t -> 'a -> 'a located
val with_cpos: Lexing.lexbuf -> 'a -> 'a located
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment