Page
Library
Module
Module type
Parameter
Class
Class type
Source
Loc is an OCaml library to manipulate code locations, which are ranges of lexing positions from a parsed file.
It is inspired by dune's Loc.t, and uses it under the hood. The type equality with Stdune.Loc.t is currently not exposed and Stdune not mentioned in the interface of Loc, with the aim of keeping the signature of Loc stable across potential internal changes in Stdune.
The code documentation of the latest release is built with odoc and published to GitHub pages here.
Attaching locations to nodes manipulated by programs can be useful for applications such as compilers, interpreters, linters, refactor tools, etc.
Here are 3 kinds of examples using the Loc library:
Similar libraries or modules: