package forester

  1. Overview
  2. Docs
include module type of struct include Asai.Range end
type string_source = Asai__Range.string_source = {
  1. title : string option;
  2. content : string;
}
type source = [
  1. | `File of string
  2. | `String of string_source
]
type position = Asai__Range.position = {
  1. source : source;
  2. offset : int;
  3. start_of_line : int;
  4. line_num : int;
}
type t = Asai__Range.t
type !'a located = 'a Asai__Range.located = {
  1. loc : t option;
  2. value : 'a;
}
val make : (position * position) -> t
val eof : position -> t
val view : t -> [ `End_of_file of position | `Range of position * position ]
val source : t -> source
val begin_line_num : t -> int
val end_line_num : t -> int
val begin_offset : t -> int
val end_offset : t -> int
val locate_opt : t option -> 'a -> 'a located
val locate : t -> 'a -> 'a located
val title : source -> string option
val of_lex_position : ?source:source -> Stdlib.Lexing.position -> position
val of_lex_range : ?source:source -> (Stdlib.Lexing.position * Stdlib.Lexing.position) -> t
val of_lexbuf : ?source:source -> Stdlib.Lexing.lexbuf -> t
val locate_lex : ?source:source -> (Stdlib.Lexing.position * Stdlib.Lexing.position) -> 'a -> 'a located
val dump_source : Stdlib.Format.formatter -> source -> unit
val dump_position : Stdlib.Format.formatter -> position -> unit
val dump : Stdlib.Format.formatter -> t -> unit
val split : t -> position * position
  • deprecated Use Asai.Range.view
val pp_located : ('b -> 'a -> 'c) -> 'b -> 'a located -> 'c
OCaml

Innovation. Community. Security.