Skip to main content

cst_to_document_and_origin_map

Function cst_to_document_and_origin_map 

Source
pub fn cst_to_document_and_origin_map(
    input: &str,
    cst: &Cst,
) -> Result<(EureDocument, OriginMap), Box<DocumentConstructionErrorWithOriginMap>>
Expand description

Parse CST to document and collect origin information for span resolution.

Returns OriginMap which includes both node origins and map key origins for precise error reporting. On error, returns partial OriginMap collected up to the point of failure for accurate error span resolution.