LibWeb: Implement CSS::Parse::parse_nth_child_pattern()

This is a modified copy of the code from Selector.cpp, to work on a
TokenStream instead of a String.
This commit is contained in:
Sam Atkins
2021-07-08 13:44:01 +01:00
committed by Andreas Kling
parent cf333574ac
commit 9cfbc07c24
2 changed files with 105 additions and 3 deletions

View File

@@ -112,6 +112,8 @@ public:
template<typename T>
Optional<Selector> parse_single_selector(TokenStream<T>&, bool is_relative = false);
Optional<Selector::SimpleSelector::NthChildPattern> parse_nth_child_pattern(TokenStream<StyleComponentValueRule>&);
// FIXME: https://www.w3.org/TR/selectors-4/
// Contrary to the name, these parse a comma-separated list of selectors, according to the spec.
Vector<Selector> parse_a_selector();