Something went wrong. Try again.
ocaml
Something went wrong. Try again.
3.2 kB · 94 lines
OCaml
at pp-ast
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495(* * SPDX-FileCopyrightText: 2026 The Forester Project Contributors * * SPDX-License-Identifier: GPL-3.0-or-later *)
open Forester_coreopen Forester_parser
module T := Typesmodule Diagnostic := Grace.Diagnostic
type latex_error
type unlinked_attribution_warning = T.(content attribution)
type broken_link = {link: T.(content link); suggestion: URI.t option}
type broken_transclusion = {t: T.transclusion; suggestion: URI.t option}
type unreferenced_asset = {path: string; uri: URI.t}
type foreign_blob_error = {path: string; msg: string}
type t = [ Eval_error.t | Expand_error.t | Config_error.t | `Parse_error of Parse.error | `Io_error of Eio_util.IO_error.t | `LaTeX_error of latex_error | `Duplicate_tree of URI.t * Range.t list * string list | `Unlinked_attribution_warning of unlinked_attribution_warning | `Broken_link of broken_link | `Broken_transclusion of broken_transclusion | `Cant_eval_anonymous_tree | `Failed_to_load_foreign_blob of foreign_blob_error | `Failed_to_parse_foreign_blob of foreign_blob_error | `Failed_to_add_edge of Vertex.t * Vertex.t | `Failed_to_add_vertex of Range.t * URI.t | `Foreign_import of Range.t * URI.t | `Unreferenced_asset of unreferenced_asset ]
val is_fatal : t -> bool
val any_fatal : t list -> bool
val tex_range : latex_error -> Range.tval latex_error : ?binary_missing:string -> range:Grace.Range.t -> string -> latex_errorval latex_error_binary_missing : latex_error -> string option
val unlinked_attribution_warning : unlinked_attribution_warning -> tval broken_transclusion : ?suggestion:URI.t -> T.transclusion -> tval broken_link : ?suggestion:URI.t -> T.(content link) -> tval cant_eval_anonymous_tree : tval failed_to_load_foreign_blob : msg:string -> path:string -> tval failed_to_parse_foreign_blob : msg:string -> path:string -> t
val print : config:Config.t -> t -> unitval eval_error : Eval_error.t -> tval expand_error : Expand_error.t -> tval config_error : Config_error.t -> tval parse_error : Parse.error -> tval io_error : Eio_util.IO_error.t -> tval duplicate_tree : uri:URI.t -> ranges:Range.t list -> paths:string list -> tval of_tex_error : latex_error -> t
val failed_to_add_edge : Vertex.t -> Vertex.t -> tval failed_to_add_vertex : range:Grace.Range.t -> URI.t -> tval foreign_import : range:Grace.Range.t -> URI.t -> tval unreferenced_asset : path:string -> URI.t -> t
val collect : (unit -> unit) -> t Seq.tval yield : t -> unitval yield_eval_error : Eval_error.t -> unitval yield_expand_error : Expand_error.t -> unit
val render : config:Config.t -> t -> t Diagnostic.tval range : config:Config.t -> t -> Range.t optionval compare : config:Config.t -> t -> t -> intval render_config_error : Config_error.t -> 'a Diagnostic.tval render_parse_error : Parse.error -> 'a Diagnostic.t
val code_to_string : t -> string(** A user-facing classification of an error: what went wrong, not which compiler phase caught it. *)
val print_diagnostic : t Diagnostic.t -> unit
val render_lsp_diagnostic : Lsp.Types.DocumentUri.t -> t Diagnostic.t -> Lsp.Types.Diagnostic.t
val print_config_error : Config_error.t -> unit