package sexplib

  1. Overview
  2. Docs
Library for serializing OCaml values to and from S-expressions

Install

Dune Dependency

Authors

Maintainers

Sources

v0.17.0.tar.gz
sha256=da863b42b81235fdcf45eb32c04fb8bde22ff446a779cfb6f989730a35103160

doc/sexplib/Sexplib/Sexp/Parse_pos/index.html

Module Sexp.Parse_posSource

Sourcetype 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

Sourceval 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

Sourceval 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.