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

Implementation for SelectorParser. More...

Public Member Functions

 SelectorParserImpl (std::span< const ComponentValue > components)
 Construct a new SelectorParserImpl over a list of ComponentValue.
 
ParseResult< Selectorparse ()
 Parse the selector list.
 
ParseResult< SelectorparseMicrosyntaxTypeSuffix ()
 Parse a An+B microsyntax type suffix, in form of "of S", where S is a selector.
 
Selector parseForgivingSelectorList ()
 Parse a forgiving selector list, a list of selectors separated by commas with invalid selectors removed.
 
Selector parseForgivingRelativeSelectorList ()
 Parse a forgiving relative selector list, a list of selectors separated by commas with invalid selectors removed.
 

Detailed Description

Implementation for SelectorParser.

Usage:

SelectorParserImpl parser(components);
auto maybeSelector = parser.parse();
A parser result, which may contain a result of type T, or an error, or both.
Definition ParseResult.h:17
Implementation for SelectorParser.
Definition SelectorParser.cc:109

Member Function Documentation

◆ parseForgivingRelativeSelectorList()

Selector donner::css::parser::SelectorParserImpl::parseForgivingRelativeSelectorList ( )
inline

Parse a forgiving relative selector list, a list of selectors separated by commas with invalid selectors removed.

This differs from parseForgivingSelectorList in that it allows a combinator prefix to be set, such as > div.

See also
https://www.w3.org/TR/selectors-4/#forgiving-selector
https://www.w3.org/TR/selectors-4/#parse-relative-selector

◆ parseForgivingSelectorList()

Selector donner::css::parser::SelectorParserImpl::parseForgivingSelectorList ( )
inline

Parse a forgiving selector list, a list of selectors separated by commas with invalid selectors removed.

See also
https://www.w3.org/TR/selectors-4/#parse-as-a-forgiving-selector-list

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