|
@@ -36,20 +36,6 @@ StyleRule::~StyleRule() = default;
|
|
|
StyleBlockRule::StyleBlockRule() = default;
|
|
|
StyleBlockRule::~StyleBlockRule() = default;
|
|
|
|
|
|
-ComponentValue::ComponentValue(Token token)
|
|
|
- : m_value(token)
|
|
|
-{
|
|
|
-}
|
|
|
-ComponentValue::ComponentValue(NonnullRefPtr<StyleFunctionRule> function)
|
|
|
- : m_value(function)
|
|
|
-{
|
|
|
-}
|
|
|
-ComponentValue::ComponentValue(NonnullRefPtr<StyleBlockRule> block)
|
|
|
- : m_value(block)
|
|
|
-{
|
|
|
-}
|
|
|
-ComponentValue::~ComponentValue() = default;
|
|
|
-
|
|
|
Declaration::Declaration() = default;
|
|
|
Declaration::~Declaration() = default;
|
|
|
|
|
@@ -124,28 +110,6 @@ String StyleBlockRule::to_string() const
|
|
|
return builder.to_string();
|
|
|
}
|
|
|
|
|
|
-String ComponentValue::to_string() const
|
|
|
-{
|
|
|
- return m_value.visit(
|
|
|
- [](Token const& token) { return token.to_string(); },
|
|
|
- [](NonnullRefPtr<StyleBlockRule> const& block) { return block->to_string(); },
|
|
|
- [](NonnullRefPtr<StyleFunctionRule> const& function) { return function->to_string(); });
|
|
|
-}
|
|
|
-
|
|
|
-String ComponentValue::to_debug_string() const
|
|
|
-{
|
|
|
- return m_value.visit(
|
|
|
- [](Token const& token) {
|
|
|
- return String::formatted("Token: {}", token.to_debug_string());
|
|
|
- },
|
|
|
- [](NonnullRefPtr<StyleBlockRule> const& block) {
|
|
|
- return String::formatted("Function: {}", block->to_string());
|
|
|
- },
|
|
|
- [](NonnullRefPtr<StyleFunctionRule> const& function) {
|
|
|
- return String::formatted("Block: {}", function->to_string());
|
|
|
- });
|
|
|
-}
|
|
|
-
|
|
|
String Declaration::to_string() const
|
|
|
{
|
|
|
StringBuilder builder;
|