package logtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Logtk.ParseLocationSource

Location in a file

A location is a range of characters in file, used for messages (error messages, warning, etc.).

The range is delimited by a start position (line,column) and an end position (line, column) + an optional file name.

Sourcetype t = {
  1. file : string;
  2. start_line : int;
  3. start_column : int;
  4. stop_line : int;
  5. stop_column : int;
}
Sourceval mk : string -> int -> int -> int -> int -> t
Sourceval mk_pair : string -> (int * int) -> (int * int) -> t
Sourceval eq : t -> t -> bool
Sourceval hash : t -> int
Sourceval combine : t -> t -> t

Position that spans the two given positions. The file is assumed to be the same in both case, and is chosen from one of the two positions.

Sourceval combine_list : t list -> t

N-ary version of combine.

Sourceval smaller : t -> t -> bool

smaller p1 p2 is true if p1 is included in p2, ie p1 is a sub-location of p2 (interval inclusion)

Sourcemodule Infix : sig ... end
include module type of Infix
Sourceval (<+>) : t option -> t option -> t option

Combine two optional locations. Left has priority

include Interfaces.PRINT with type t := t
Sourceval to_string : t -> string
Sourceval pp_opt : t option CCFormat.printer

Lexbuf

Sourceval set_file : Lexing.lexbuf -> string -> unit

Change the file name used for positions in this lexbuf

Sourceval of_lexbuf : Lexing.lexbuf -> t

Recover a position from a lexbuf