package wax-lib
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4361e1324b7754a4c08ab5b505df32061f3ce0cea60443fd0d3699e0fa796b32
sha512=fcc756d2f160ba90a9aa1131f2ab22ed7f45466ccd658c21cf9df6868a6aab0cee7f404719d698a379958802f9820398f2fe0685ecc4dda018ca4f653294e39b
doc/wax-lib.utils/Wax_utils/Parser_error_runtime/Make/index.html
Module Parser_error_runtime.MakeSource
Parameters
Signature
A resolved marker and its own label text (the marker prefix and its bounds removed): a delimiter hint gives a span at the opening delimiter as wide as the alias its label names (one character for a plain (, two for a compound [|), a hedge subject the whole construct's true span (rendered as a multi-line spine when it crosses several lines).
resolve ~source ~env message post-processes a stele-generated message against the error environment env and the whole source text source: it expands any Menhir $i source-slice references, then turns each marker line into a label:
<N>…anchors at theN-th stack cell's opening delimiter (walking back over blanks to the(/[/{when the cell's own start is not itself the delimiter);<^N>…anchors across theN-th stack cell's full span (the whole construct, however many lines it crosses), and dropped when that span is zero-width (an epsilon reduction — no construct to point at).
Returns the main message (marker lines removed) and the located labels in the order the markers appear (subject before delimiter hint, matching the generator's emission). A marker whose depth exceeds the live stack, or whose depth field it does not recognise, is left inline in the main message.