StyleBlockRule.h 708 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright (c) 2020-2021, the SerenityOS developers.
  3. * Copyright (c) 2021, Sam Atkins <atkinssj@gmail.com>
  4. *
  5. * SPDX-License-Identifier: BSD-2-Clause
  6. */
  7. #pragma once
  8. #include <AK/Vector.h>
  9. #include <LibWeb/CSS/Parser/Token.h>
  10. namespace Web::CSS {
  11. class StyleBlockRule {
  12. friend class Parser;
  13. public:
  14. StyleBlockRule();
  15. ~StyleBlockRule();
  16. bool is_curly() const { return m_token.is_open_curly(); }
  17. bool is_paren() const { return m_token.is_open_paren(); }
  18. bool is_square() const { return m_token.is_open_square(); }
  19. Vector<String> const& values() const { return m_values; }
  20. String to_string() const;
  21. private:
  22. Token m_token;
  23. Vector<String> m_values;
  24. };
  25. }