sig
module Error :
sig
type gravity = [ `error | `fatal_error | `warning ]
type message =
[ `bad_size_specification_in_image of string
| `begin_without_arg
| `cell_inside_cell
| `cell_out_of_table
| `closing_brace_matching_begin
| `command_shouldnot_have_args of string
| `end_of_input_not_in_text of string
| `ignored_text_after_verbatim_begin of string
| `invalid_end_pattern of string
| `item_out_of_list
| `malformed_verbatim_begin
| `non_matching_end
| `nothing_to_end_with_brace
| `terminating_with_open_environments of string list
| `transformer_lost of string
| `unknown_command of string
| `unknown_list_style of string
| `unknown_quotation_style of string ]
type location =
Bracetax_error.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
val to_string :
location * [< `error | `fatal_error | `warning ] * message -> string
end
type writer =
Bracetax_signatures.writer = {
w_write : string -> unit;
w_error : Error.error -> unit;
}
val make_writer :
write:(string -> unit) -> error:(Error.error -> unit) -> writer
type printer =
Bracetax_signatures.printer = {
print_comment : Error.location -> string -> unit;
print_text : Error.location -> string -> unit;
enter_cmd : Error.location -> string -> string list -> unit;
leave_cmd : Error.location -> unit;
terminate : Error.location -> unit;
is_raw : string -> bool;
default_raw_end : string -> string;
enter_raw : Error.location -> string -> string list -> unit;
print_raw : Error.location -> string -> unit;
leave_raw : Error.location -> unit;
error : Error.error -> unit;
}
end