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:

auto maybeSelector = parser.parse();
SelectorParserImpl(std::span< const ComponentValue > components)
Construct a new SelectorParserImpl over a list of ComponentValue.
Definition SelectorParser.cc:114
Parsers for various CSS data types, such as the top-level StylesheetParser and SelectorParser,...

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:
  • donner/css/parser/SelectorParser.cc