Donner SVG Editor & Engine
SVG-native editor and embeddable SVG2 + CSS3 engine in C++20, with GPU (WebGPU) and compact CPU renderers, built for correctness, security, and performance.
Loading...
Searching...
No Matches
SourceDiagnostics.h File Reference
#include <cstddef>
#include <cstdint>
#include <span>
#include <string>
#include <string_view>
#include <vector>
#include "donner/base/ParseDiagnostic.h"
#include "donner/editor/FlashDecorations.h"
Include dependency graph for SourceDiagnostics.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  donner::editor::SourceDiagnostic
 Source diagnostic prepared for editor presentation. More...
struct  donner::editor::SourceDiagnosticSnapshot
 Immutable diagnostics published by one parse revision. More...

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.

Functions

SourceDiagnosticSnapshot donner::editor::BuildSourceDiagnosticSnapshot (std::span< const ParseDiagnostic > diagnostics, std::string_view source, std::uint64_t revision)
 Normalize parser diagnostics for source-editor presentation.

Function Documentation

◆ BuildSourceDiagnosticSnapshot()

SourceDiagnosticSnapshot donner::editor::BuildSourceDiagnosticSnapshot ( std::span< const ParseDiagnostic > diagnostics,
std::string_view source,
std::uint64_t revision )
nodiscard

Normalize parser diagnostics for source-editor presentation.

Ranges are clamped to source, point diagnostics expand to a visible byte when possible, and missing line information is recovered from the source text. Diagnostic ids are deterministic for the same revision and change when a new parse revision publishes the same diagnostic.