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

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
parent 87b125dcb9
commit fc3d51c59e
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>