7#ifndef LOOMC_DIAGNOSTIC_H_
8#define LOOMC_DIAGNOSTIC_H_
24typedef enum loomc_diagnostic_severity_e {
size_t loomc_host_size_t
Host allocation and container size type.
Definition base.h:45
loomc_diagnostic_severity_t
Diagnostic severity.
Definition diagnostic.h:24
@ LOOMC_DIAGNOSTIC_SEVERITY_NOTE
Informational note.
Definition diagnostic.h:26
@ LOOMC_DIAGNOSTIC_SEVERITY_ERROR
Error that makes the operation fail.
Definition diagnostic.h:32
@ LOOMC_DIAGNOSTIC_SEVERITY_WARNING
Warning that does not make the operation fail.
Definition diagnostic.h:29
Immutable source handles used by parsing, indexing, linking, and compiling.
struct loomc_source_t loomc_source_t
Immutable source handle.
Definition source.h:80
Borrowed diagnostic view owned by a result object.
Definition diagnostic.h:72
loomc_string_view_t message
Human-readable rendered message.
Definition diagnostic.h:80
loomc_string_view_t code
Stable diagnostic code.
Definition diagnostic.h:77
loomc_source_range_t range
Primary source range.
Definition diagnostic.h:83
loomc_diagnostic_severity_t severity
Diagnostic severity.
Definition diagnostic.h:74
Source range attached to a diagnostic.
Definition diagnostic.h:44
uint32_t start_line
One-based starting line, or zero when unavailable.
Definition diagnostic.h:55
uint32_t start_column
One-based starting column, or zero when unavailable.
Definition diagnostic.h:58
const loomc_source_t * source
Source handle that owns or identifies the bytes.
Definition diagnostic.h:46
uint32_t end_column
One-based ending column, or zero when unavailable.
Definition diagnostic.h:64
loomc_host_size_t start
First byte in source contents covered by the range.
Definition diagnostic.h:49
loomc_host_size_t end
One-past-last byte in source contents covered by the range.
Definition diagnostic.h:52
uint32_t end_line
One-based ending line, or zero when unavailable.
Definition diagnostic.h:61
Non-owning string view over bytes that need not be NUL-terminated.
Definition base.h:63