StyleComponentValueRule.h 666 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Copyright (c) 2020-2021, the SerenityOS developers.
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibWeb/CSS/Parser/StyleBlockRule.h>
  8. #include <LibWeb/CSS/Parser/StyleFunctionRule.h>
  9. #include <LibWeb/CSS/Parser/Token.h>
  10. namespace Web::CSS {
  11. class StyleComponentValueRule {
  12. friend class Parser;
  13. public:
  14. enum class ComponentType {
  15. Token,
  16. Function,
  17. Block
  18. };
  19. explicit StyleComponentValueRule(ComponentType);
  20. ~StyleComponentValueRule();
  21. String to_string() const;
  22. private:
  23. ComponentType m_type;
  24. Token m_token;
  25. StyleFunctionRule m_function;
  26. StyleBlockRule m_block;
  27. };
  28. }