|
Ruby 4.1.0dev (2026-04-29 revision 1c39cc81159083e0c822362691bc3e35b2bddb00)
|
A list of diagnostics generated during parsing. More...
#include "prism/compiler/exported.h"#include "prism/compiler/nodiscard.h"#include "prism/compiler/nonnull.h"#include "prism/ast.h"

Go to the source code of this file.
Typedefs | |
| typedef struct pm_diagnostic_t | pm_diagnostic_t |
| An opaque pointer to a diagnostic generated during parsing. | |
Enumerations | |
| enum | pm_error_level_t { PM_ERROR_LEVEL_SYNTAX = 0 , PM_ERROR_LEVEL_ARGUMENT = 1 , PM_ERROR_LEVEL_LOAD = 2 } |
| The levels of errors generated during parsing. More... | |
| enum | pm_warning_level_t { PM_WARNING_LEVEL_DEFAULT = 0 , PM_WARNING_LEVEL_VERBOSE = 1 } |
| The levels of warnings generated during parsing. More... | |
Functions | |
| PRISM_EXPORTED_FUNCTION const char * | pm_diagnostic_type (const pm_diagnostic_t *diagnostic) PRISM_NONNULL(1) |
| Get the type of the given diagnostic. | |
| PRISM_EXPORTED_FUNCTION pm_location_t | pm_diagnostic_location (const pm_diagnostic_t *diagnostic) PRISM_NONNULL(1) |
| Get the location of the given diagnostic. | |
| PRISM_EXPORTED_FUNCTION const char * | pm_diagnostic_message (const pm_diagnostic_t *diagnostic) PRISM_NONNULL(1) |
| Get the message of the given diagnostic. | |
| PRISM_EXPORTED_FUNCTION pm_error_level_t | pm_diagnostic_error_level (const pm_diagnostic_t *diagnostic) PRISM_NONNULL(1) |
| Get the error level associated with the given diagnostic. | |
| PRISM_EXPORTED_FUNCTION pm_warning_level_t | pm_diagnostic_warning_level (const pm_diagnostic_t *diagnostic) PRISM_NONNULL(1) |
| Get the warning level associated with the given diagnostic. | |
A list of diagnostics generated during parsing.
Definition in file diagnostic.h.
| typedef struct pm_diagnostic_t pm_diagnostic_t |
An opaque pointer to a diagnostic generated during parsing.
Definition at line 18 of file diagnostic.h.
| enum pm_error_level_t |
The levels of errors generated during parsing.
Definition at line 23 of file diagnostic.h.
| enum pm_warning_level_t |
The levels of warnings generated during parsing.
| Enumerator | |
|---|---|
| PM_WARNING_LEVEL_DEFAULT | For warnings which should be emitted if $VERBOSE != nil. |
| PM_WARNING_LEVEL_VERBOSE | For warnings which should be emitted if $VERBOSE == true. |
Definition at line 37 of file diagnostic.h.
| PRISM_EXPORTED_FUNCTION pm_error_level_t pm_diagnostic_error_level | ( | const pm_diagnostic_t * | diagnostic | ) |
Get the error level associated with the given diagnostic.
| diagnostic | The diagnostic to get the error level of. |
Definition at line 822 of file diagnostic.c.
| PRISM_EXPORTED_FUNCTION pm_location_t pm_diagnostic_location | ( | const pm_diagnostic_t * | diagnostic | ) |
Get the location of the given diagnostic.
| diagnostic | The diagnostic to get the location of. |
Definition at line 806 of file diagnostic.c.
| PRISM_EXPORTED_FUNCTION const char * pm_diagnostic_message | ( | const pm_diagnostic_t * | diagnostic | ) |
Get the message of the given diagnostic.
| diagnostic | The diagnostic to get the message of. |
Definition at line 814 of file diagnostic.c.
| PRISM_EXPORTED_FUNCTION const char * pm_diagnostic_type | ( | const pm_diagnostic_t * | diagnostic | ) |
Get the type of the given diagnostic.
| diagnostic | The diagnostic to get the type of. |
Definition at line 798 of file diagnostic.c.
| PRISM_EXPORTED_FUNCTION pm_warning_level_t pm_diagnostic_warning_level | ( | const pm_diagnostic_t * | diagnostic | ) |
Get the warning level associated with the given diagnostic.
| diagnostic | The diagnostic to get the warning level of. |
Definition at line 830 of file diagnostic.c.