Sstt_repl.PositionExtension of standard library's positions.
type position = ttype 'a located = 'a * tDecoration of a value with a position.
val value : 'a located -> 'avalue dv returns the raw value that underlies the decorated value dv.
position dv returns the position that decorates the decorated value dv.
destruct dv returns the couple of position and value of a decorated value dv.
val located : ('a -> 'b) -> 'a located -> 'blocated f x applies f to the value of x.
val with_cpos : Stdlib.Lexing.lexbuf -> 'a -> 'a locatedwith_cpos p v decorates v with a lexical position p.
val with_poss :
Stdlib.Lexing.position ->
Stdlib.Lexing.position ->
'a ->
'a locatedwith_poss start stop v decorates v with a position (start, stop).
val unknown_pos : 'a -> 'a locatedunknown_pos x decorates v with an unknown position.
val dummy : tThis value is used when an object does not come from a particular input location.
val iter : ('a -> unit) -> 'a located -> unititer f dv applies f to the value inside dv.
mapd f v extends the decoration from v to both members of the pair f v.
column p returns the number of characters from the beginning of the line of the Lexing.position p.
column p returns the line number of to the Lexing.position p.
column p returns the offset from the beginning of the Lexing.position p.
characters p1 p2 returns the character interval between p1 and p2 assuming they are located in the same line.
val start_of_position : t -> Stdlib.Lexing.positionstart_of_position p returns the beginning of a position p.
val end_of_position : t -> Stdlib.Lexing.positionend_of_position p returns the end of a position p.
val filename_of_position : t -> stringfilename_of_position p returns the filename of a position p.
join p1 p2 returns a position that starts where p1 starts and stops where p2 stops.
val lex_join : Stdlib.Lexing.position -> Stdlib.Lexing.position -> tlex_join l1 l2 returns a position that starts at l1 and stops at l2.
string_of_lex_pos p returns a string representation for the lexing position p.
val string_of_pos : t -> stringstring_of_pos p returns the standard (Emacs-like) representation of the position p.
pos_or_undef po is the identity function except if po = None, in that case, it returns undefined_position.
val cpos : Stdlib.Lexing.lexbuf -> tcpos lexbuf returns the current position of the lexer.