package atd-jsonlike

  1. Overview
  2. Docs

Module Atd_jsonlike.PosSource

Position (index) within a source file

Sourcetype t = {
  1. row : int;
    (*

    line number, starting from 0

    *)
  2. column : int;
    (*

    position within the line, starting from 0

    *)
}

Position within a file using zero-based matrix-like notation.

Due to differences in line endings between Windows and Unix systems and conversions occurring when reading files, we don't track the byte offset from the beginning of the file.

Sourceval zero : t

Position at the start of an input: row 0, column 0.

Sourceval equal : t -> t -> bool
Sourceval compare : t -> t -> int