package stele
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 and line breaks 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 (anything but decimal digits, after an optional ^), is left inline in the main message.