Donner
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
donner::ParseDiagnostic Struct Reference

A diagnostic message from a parser, with severity, source range, and human-readable reason. More...

#include "donner/base/ParseDiagnostic.h"

Collaboration diagram for donner::ParseDiagnostic:
[legend]

Static Public Member Functions

static ParseDiagnostic Error (RcString reason, FileOffset location)
 Create an error diagnostic at a single offset.
static ParseDiagnostic Error (RcString reason, SourceRange range)
 Create an error diagnostic with a source range.
static ParseDiagnostic Warning (RcString reason, FileOffset location)
 Create a warning diagnostic at a single offset.
static ParseDiagnostic Warning (RcString reason, SourceRange range)
 Create a warning diagnostic with a source range.

Public Attributes

DiagnosticSeverity severity = DiagnosticSeverity::Error
 Severity of this diagnostic.
RcString reason
 Human-readable description of the problem.
SourceRange range = {FileOffset::Offset(0), FileOffset::Offset(0)}
 Source range that this diagnostic applies to. For point diagnostics where the end is unknown, start == end.

Friends

std::ostream & operator<< (std::ostream &os, const ParseDiagnostic &diag)
 Ostream output operator for ParseDiagnostic, outputs severity and error message.

Detailed Description

A diagnostic message from a parser, with severity, source range, and human-readable reason.

This is the shared diagnostic type used across all donner parsers (XML, SVG, CSS, etc.).

Examples
svg_tree_interaction.cc.

The documentation for this struct was generated from the following file: