LibWeb: Use an enum class for the "top-level flag"

This commit is contained in:
Sam Atkins 2022-03-29 13:46:16 +01:00 committed by Andreas Kling
commit fc3d51c59e
Notes: sideshowbarker 2024-07-17 20:22:04 +09:00
2 changed files with 11 additions and 7 deletions

View file

@ -169,8 +169,12 @@ private:
};
Optional<Selector::SimpleSelector::ANPlusBPattern> parse_a_n_plus_b_pattern(TokenStream<StyleComponentValueRule>&, AllowTrailingTokens = AllowTrailingTokens::No);
enum class TopLevel {
No,
Yes
};
template<typename T>
[[nodiscard]] NonnullRefPtrVector<StyleRule> consume_a_list_of_rules(TokenStream<T>&, bool top_level);
[[nodiscard]] NonnullRefPtrVector<StyleRule> consume_a_list_of_rules(TokenStream<T>&, TopLevel);
template<typename T>
[[nodiscard]] NonnullRefPtr<StyleRule> consume_an_at_rule(TokenStream<T>&);
template<typename T>