Pure OCaml Yaml 1.2 reader and writer using Bytesrw
at main 952 B view raw
1(*--------------------------------------------------------------------------- 2 Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 SPDX-License-Identifier: ISC 4 ---------------------------------------------------------------------------*) 5 6(** Source spans representing ranges in input *) 7 8type t = { 9 start : Position.t; 10 stop : Position.t; 11} 12 13val make : start:Position.t -> stop:Position.t -> t 14(** Create a span from start and stop positions *) 15 16val point : Position.t -> t 17(** Create a zero-width span at a single position *) 18 19val merge : t -> t -> t 20(** Merge two spans into one covering both *) 21 22val extend : t -> Position.t -> t 23(** Extend a span to a new stop position *) 24 25val pp : Format.formatter -> t -> unit 26(** Pretty-print a span *) 27 28val to_string : t -> string 29(** Convert span to string *) 30 31val compare : t -> t -> int 32(** Compare two spans *) 33 34val equal : t -> t -> bool 35(** Test equality of two spans *)