Donner
C++20 SVG rendering library
Loading...
Searching...
No Matches
donner::css::parser Namespace Reference

Parsers for various CSS data types, such as the top-level StylesheetParser and SelectorParser, as well as internal details such as ColorParser. More...

Classes

class  AnbMicrosyntaxParser
 Parse a CSS value, per https://www.w3.org/TR/css-syntax-3/#parse-list-of-component-values. More...
 
struct  AnbValueAndSelector
 An+B microsyntax value with an optional selector, for pseudo-class selectors such as :nth-child(An+B of S). More...
 
class  ColorParser
 Parse a CSS color, either from a string or the CSS intermediate representation, a list of ComponentValues. More...
 
class  DeclarationListParser
 Parse a CSS declaration list, which can be either from an HTML/SVG style attribute, or from the list of component values from within a rule. More...
 
class  RuleParser
 Rule-related parsing routines, including parsing individual rules, lists of rules, and stylesheets. More...
 
class  SelectorParser
 Parse a CSS selector, or list of selectors, and returns a Selector that can be matched against in the stylesheet. More...
 
class  SelectorParserImpl
 Implementation for SelectorParser. More...
 
class  StylesheetParser
 Parse a CSS stylesheet into a list of selectors and their associated declarations. More...
 
class  ValueParser
 Parse a CSS value, per https://www.w3.org/TR/css-syntax-3/#parse-list-of-component-values. More...
 

Typedefs

using SubclassSelector
 Additional constraints that can be added to a CompoundSelector, such as matching an ID, class, or attribute.
 

Functions

int LLVMFuzzerTestOneInput (const uint8_t *data, size_t size)
 Fuzzer entry point, see https://llvm.org/docs/LibFuzzer.html.
 

Detailed Description

Parsers for various CSS data types, such as the top-level StylesheetParser and SelectorParser, as well as internal details such as ColorParser.

These are wrapped in the donner::css::CSS convenience API. Using these lower-level APIs allows for finer-grained control and error propagation.


Class Documentation

◆ donner::css::parser::AnbValueAndSelector

struct donner::css::parser::AnbValueAndSelector

An+B microsyntax value with an optional selector, for pseudo-class selectors such as :nth-child(An+B of S).

Collaboration diagram for donner::css::parser::AnbValueAndSelector:
[legend]
Class Members
unique_ptr< Selector > selector The optional selector.
AnbValue value The An+B value.

Typedef Documentation

◆ SubclassSelector

Initial value:
std::variant<IdSelector, ClassSelector, PseudoClassSelector, AttributeSelector>

Additional constraints that can be added to a CompoundSelector, such as matching an ID, class, or attribute.