package ostap

  1. Overview
  2. Docs

Module Msg.CoordSource

Text coordinate.

Sourcetype t = int * int

Type synonym: line, column.

Sourceval line : t -> int

Gets line of coordinate.

Sourceval col : t -> int

Gets column of coordinate.

Sourceval toString : t -> string

String conversion.

Sourceval next : bool -> t -> t

next isNewLine loc gets next coord depending on the current symbol

Sourceval shift : t -> string -> int -> int -> t

shift loc s b e takes text coordinates loc, string s and two indexes b and e, scans s from b to e inclusively and shifts loc to take newlines into account.

Sourceval compare : t -> t -> int

Comparison function.

OCaml

Innovation. Community. Security.