bracetax

Simple and deterministic text processing syntax
type gravity = [
| `fatal_error
| `error
| `warning
]
type message = [
| `transformer_lost of string
| `ignored_text_after_verbatim_begin of string
| `malformed_verbatim_begin
| `cell_out_of_table
| `cell_inside_cell
| `cell_out_of_table_bounds
| `unknown_command of string
| `begin_without_arg
| `non_matching_end
| `closing_brace_matching_begin
| `nothing_to_end_with_brace
| `item_out_of_list
| `terminating_with_open_environments of string list
| `bad_size_specification_in_image of string
| `unknown_list_style of string
| `end_of_input_not_in_text of string
| `invalid_end_pattern of string
| `command_shouldnot_have_args of string
| `unknown_quotation_style of string
]
type location = {
l_line : int;
l_char : int;
l_file : string;
}
type error = [
| `message of location * gravity * message
| `undefined of string
]
type error_fun = error -> unit
val mk : location -> gravity -> message -> error

Build an error message.

val to_string : (location * [< `error | `fatal_error | `warning ] * message) -> string

A built-in function for rendering errors as strings.