Prism Ruby parser
Loading...
Searching...
No Matches
errors_format.h
Go to the documentation of this file.
1
6#ifndef PRISM_ERRORS_FORMAT_H
7#define PRISM_ERRORS_FORMAT_H
8
9#include "prism/compiler/exported.h"
10#include "prism/compiler/nodiscard.h"
11#include "prism/compiler/nonnull.h"
12
13#include "prism/buffer.h"
14#include "prism/diagnostic.h"
15#include "prism/parser.h"
16
34
51PRISM_EXPORTED_FUNCTION pm_error_level_t pm_errors_format(const pm_parser_t *parser, pm_buffer_t *buffer, pm_errors_format_type_t format_type) PRISM_NONNULL(1, 2);
52
53#endif
A wrapper around a contiguous block of allocated memory.
struct pm_buffer_t pm_buffer_t
A wrapper around a contiguous block of allocated memory.
Definition buffer.h:18
A list of diagnostics generated during parsing.
pm_error_level_t
The levels of errors generated during parsing.
Definition diagnostic.h:23
PRISM_EXPORTED_FUNCTION pm_error_level_t pm_errors_format(const pm_parser_t *parser, pm_buffer_t *buffer, pm_errors_format_type_t format_type) PRISM_NONNULL(1
Format the errors in a parser into a buffer.
pm_errors_format_type_t
The type of formatting to use when formatting errors.
Definition errors_format.h:18
@ PM_ERRORS_FORMAT_PLAIN
Format errors in a plain format with no colors or styles.
Definition errors_format.h:22
@ PM_ERRORS_FORMAT_COLOR
Format errors in a color format with bold and colors.
Definition errors_format.h:32
@ PM_ERRORS_FORMAT_STYLE
Format errors in a style format with bold only.
Definition errors_format.h:27
The parser used to parse Ruby source.
struct pm_parser_t pm_parser_t
The parser used to parse Ruby source.
Definition parser.h:22