StyleBlockRule.h 770 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/RefCounted.h>
  9. #include <AK/Vector.h>
  10. #include <LibWeb/CSS/Parser/Token.h>
  11. namespace Web::CSS {
  12. class StyleBlockRule : public RefCounted<StyleBlockRule> {
  13. friend class Parser;
  14. public:
  15. StyleBlockRule();
  16. ~StyleBlockRule();
  17. bool is_curly() const { return m_token.is_open_curly(); }
  18. bool is_paren() const { return m_token.is_open_paren(); }
  19. bool is_square() const { return m_token.is_open_square(); }
  20. Vector<String> const& values() const { return m_values; }
  21. String to_string() const;
  22. private:
  23. Token m_token;
  24. Vector<String> m_values;
  25. };
  26. }