A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
Loading...
Searching...
No Matches
diagnostic.cc File Reference
#include "a11/flow/diagnostic.h"
#include <algorithm>
#include <array>
#include <cstddef>
#include <string_view>
#include <vector>
#include <absl/types/span.h>
#include "a11/utf8.h"

Namespaces

namespace  a11
 
namespace  a11::flow
 

Functions

std::string_view a11::flow::SeverityName (Severity severity)
 The spelling of a severity in the output formats.
 
std::string_view a11::flow::FamilyName (Family family)
 The spelling of a family in the output formats.
 
Severity a11::flow::SeverityFromName (std::string_view name)
 Severity for a name from the output formats, or kError if unknown.
 
Family a11::flow::FamilyFromName (std::string_view name)
 Family for a name from the output formats, or kSyntax if unknown.
 
const Diagnostic *absl_nullable a11::flow::FirstError (absl::Span< const Diagnostic > diagnostics)
 The first error in diagnostics, or nullptr if none is an error.
 
absl::Span< const CodeInfo > a11::flow::KnownCodes ()
 Every diagnostic code the language can produce, sorted by code.
 
const CodeInfo *absl_nullable a11::flow::FindCode (std::string_view code)
 The entry for a code, or nullptr if nothing publishes it.
 
void a11::flow::SortDiagnostics (std::vector< Diagnostic > &diagnostics)
 Sorts diagnostics into the order every frontend presents them in: by position, then by code, so two runs over the same file agree byte for byte.