17#ifndef _LIBPRETTYERR_ERROR_H
18#define _LIBPRETTYERR_ERROR_H
29#define PERR_Str(line_, start_) \
30 (struct libprettyerr_str){ .line = line_, .start = start_ }
31#define PERR_Str_None() \
39#define PERR_Pos(index_, length_) \
40 (struct libprettyerr_pos){ .index = index_, .length = length_ }
75#define PERR_Error(type_, primary_, error_position_, main_, explain_, error_code_, filename_) \
76 (struct libprettyerr_error){ \
77 .type = type_, .primary = primary_, .error_position = error_position_, \
78 .main = main_, .explain = explain_, .error_code = error_code_, \
79 .filename = filename_ \
82#define PERR_Secondary(type_, primary_, error_position_, main_, filename_) \
83 (struct libprettyerr_error){ \
84 .type = type_, .primary = primary_, .error_position = error_position_, \
85 .main = main_, .filename = filename_ \
101#define PRETTYERR_EXPORT
PRETTYERR_EXPORT perr_runner_t perr_runner_basic_style
PRETTYERR_EXPORT void perr_print_line_number(const struct libprettyerr_printer *printer, const struct libprettyerr_error *err, const char *color)
@ PERR_BOX_THIN_UL_ROUNDED
@ PERR_BOX_THIN_BL_ROUNDED
PRETTYERR_EXPORT perr_runner_t perr_runner_secondary_style
PRETTYERR_EXPORT void perr_printer_init(struct libprettyerr_printer *printer, FILE *stream, const char *source, bool utf8, libprettyerr_runner_t style)
libprettyerr_runner_t perr_runner_t
PRETTYERR_EXPORT void perr_print_error(const struct libprettyerr_printer *printer, const struct libprettyerr_error *err)
void(* libprettyerr_runner_t)(const struct libprettyerr_printer *, const struct libprettyerr_error *)
struct libprettyerr_str primary
enum libprettyerr_errtype type
struct libprettyerr_pos error_position
libprettyerr_runner_t runner