package grace

  1. Overview
  2. Docs
A fancy diagnostics library that allows your compilers to exit with grace

Install

Dune Dependency

Authors

Maintainers

Sources

grace-0.2.0.tbz
sha256=821df54882c9253eac69f47bcf3a71ffdc61c77fdae42587c32aada5b56cfeae
sha512=007afa83251da3ddecd874e120ea89dce0253c387a64a5fece69069d3486ec5eb6c82d6bf0febaf23dd322bd9eaadc2f7882e33f05a2e1fa18a41294e7dc3ba1

doc/grace.source_reader/Grace_source_reader/Line_starts/index.html

Module Grace_source_reader.Line_startsSource

Sourcetype t = {
  1. unsafe_get : int -> Grace.Byte_index.t;
  2. length : int;
}

The type of line starts.

For computation of line numbers from ranges, we require a function mapping line indices to byte indicies and the maximum line index.

A valid line_starts for a source satisfies:

  1. ...
Sourcetype fn = Source_descr.t -> t

A line starts function maps a given source (descriptor) to its line starts.

Sourceval default_fn : fn
OCaml

Innovation. Community. Security.