2#ifndef CEL_PARSER_DIAGNOSTIC_HPP
3#define CEL_PARSER_DIAGNOSTIC_HPP
parse_error(error_category category, source_span span, std::string message)
Constructs a diagnostic with an owned message, category, and byte interval. Precondition: span....
error_category category() const noexcept
Returns the category supplied at construction.
Definition diagnostic.hpp:46
source_span span() const noexcept
Returns the byte interval supplied at construction, without translating offsets.
Definition diagnostic.hpp:48
error_category
Classifies a source diagnostic independently of its human-readable message. Example: error_category::...
Definition diagnostic.hpp:25
@ resource_limit
A documented producer or compilation resource limit.
Definition diagnostic.hpp:31
@ malformed_input
Invalid UTF-8, spelling, comment, or input character.
Definition diagnostic.hpp:26
@ type_error
An unknown, unsupported, ineligible, or incompatible type.
Definition diagnostic.hpp:28
@ unsupported_literal
A literal or suffix outside bool/binary64 scope.
Definition diagnostic.hpp:27
@ lookup_error
An undefined name or unmatched operation signature.
Definition diagnostic.hpp:29
@ delimiter_error
An unmatched, mismatched, or unclosed delimiter.
Definition diagnostic.hpp:30
Provides checked CEL compilation, extension libraries, and owned results.
Definition compiler.hpp:10
Identifies a half-open UTF-8 byte interval; begin never exceeds end. Example: source_span{0,...
Definition diagnostic.hpp:15
bool operator==(const source_span &) const =default
Returns true if both byte offsets are equal.
std::size_t begin
Inclusive byte offset in the producer's source.
Definition diagnostic.hpp:16
std::size_t end
Exclusive byte offset; equal to begin for an empty interval.
Definition diagnostic.hpp:17