(* HTML5 parse error types *) type t = { code : Parse_error_code.t; line : int; column : int; } let make ~code ~line ~column = { code = Parse_error_code.of_string code; line; column } let make_with_code ~code ~line ~column = { code; line; column } let to_string err = Printf.sprintf "(%d,%d): %s" err.line err.column (Parse_error_code.to_string err.code) let pp fmt err = Format.fprintf fmt "(%d,%d): %a" err.line err.column Parse_error_code.pp err.code