package sexplib

  1. Overview
  2. Docs
type t = private Pre_sexp.Parse_pos.t = {
  1. mutable text_line : int;
    (*

    Line position in parsed text

    *)
  2. mutable text_char : int;
    (*

    Character position in parsed text

    *)
  3. mutable global_offset : int;
    (*

    Global/logical offset

    *)
  4. mutable buf_pos : int;
    (*

    Read position in string buffer

    *)
}

Position information after complete parse

val create : ?text_line:int -> ?text_char:int -> ?buf_pos:int -> ?global_offset:int -> unit -> t

create ?text_line ?text_char ?buf_pos ?global_offset ()

  • returns

    a parse position with the given parameters.

  • parameter text_line

    default = 1

  • parameter text_char

    default = 0

  • parameter global_offset

    default = 0

  • parameter buf_pos

    default = 0

val with_buf_pos : t -> int -> t

with_buf_pos t pos

  • returns

    a copy of the parse position t where buf_pos is set to pos.

OCaml

Innovation. Community. Security.