Donner
C++20 SVG rendering library
|
InvalidRule is used to represent a rule which could not be parsed, such as an invalid at-rule. More...
#include "donner/css/Rule.h"
Public Types | |
enum class | Type { Default , ExtraInput } |
Type of the invalid rule. More... | |
Public Member Functions | |
InvalidRule (Type type=Type::Default) | |
Construct an InvalidRule with the given type. | |
bool | operator== (const InvalidRule &other) const |
Equality operator. | |
Public Attributes | |
Type | type |
Type of the invalid rule. | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const InvalidRule &invalidRule) |
Output a human-readable parsed representation of InvalidRule to the given stream. | |
InvalidRule is used to represent a rule which could not be parsed, such as an invalid at-rule.
For example, the following is an invalid at-rule:
The @charset
is a valid at-rule, but it is missing a semicolon at the end, so it is invalid.
The InvalidRule may have a more specific type, such as ExtraInput
, depending on how the error was triggered.
|
inlineexplicit |
Construct an InvalidRule with the given type.
type | Type of the invalid rule. |
|
friend |
Output a human-readable parsed representation of InvalidRule to the given stream.
For example, InvalidRule
or InvalidRule(ExtraInput)
.
os | Output stream. |
invalidRule | InvalidRule to output. |