(*--------------------------------------------------------------------------- Copyright (c) 2025 Anil Madhavapeddy . All rights reserved. SPDX-License-Identifier: MIT ---------------------------------------------------------------------------*) (** Bridge between Html5rw parse errors and validation messages. This module converts parse errors from the Html5rw parser into standardized validation messages. *) (** Convert a parse error to a validation message. Extracts error code, line, column, and creates a Message.t with severity set to Error. @param system_id Optional file path or URL to include in location *) val of_parse_error : ?system_id:string -> Html5rw.parse_error -> Message.t (** Collect all parse errors from a parse result. Extracts all parse errors from the Html5rw.t result and converts them to validation messages. @param system_id Optional file path or URL to include in locations *) val collect_parse_errors : ?system_id:string -> Html5rw.t -> Message.t list