1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:17:35 +00:00

LibWeb: Handle trailing tokens outside of parse_a_n_plus_b_pattern()

parse_a_n_plus_b_pattern()'s job is to parse as much of the TokenStream
as it can as a An+B, and then stop. The caller can then deal with any
trailing tokens as it wishes.
This commit is contained in:
Sam Atkins 2022-04-27 12:03:42 +01:00 committed by Andreas Kling
parent d6ae08d023
commit f2d6bdce3f
2 changed files with 25 additions and 40 deletions

View file

@ -169,11 +169,7 @@ private:
template<typename T>
RefPtr<Supports> parse_a_supports(TokenStream<T>&);
enum class AllowTrailingTokens {
No,
Yes
};
Optional<Selector::SimpleSelector::ANPlusBPattern> parse_a_n_plus_b_pattern(TokenStream<ComponentValue>&, AllowTrailingTokens = AllowTrailingTokens::No);
Optional<Selector::SimpleSelector::ANPlusBPattern> parse_a_n_plus_b_pattern(TokenStream<ComponentValue>&);
enum class TopLevel {
No,