2021-03-09 17:36:21 +01:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2020-2021, SerenityOS developers
|
|
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2021-03-09 17:36:21 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <LibWeb/CSS/Parser/StyleBlockRule.h>
|
|
|
|
|
#include <LibWeb/CSS/Parser/StyleFunctionRule.h>
|
2021-03-09 20:06:52 +01:00
|
|
|
#include <LibWeb/CSS/Parser/Token.h>
|
2021-03-09 17:36:21 +01:00
|
|
|
|
|
|
|
|
namespace Web::CSS {
|
|
|
|
|
|
|
|
|
|
class StyleComponentValueRule {
|
|
|
|
|
friend class Parser;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
enum class ComponentType {
|
|
|
|
|
Token,
|
|
|
|
|
Function,
|
|
|
|
|
Block
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
explicit StyleComponentValueRule(ComponentType);
|
|
|
|
|
~StyleComponentValueRule();
|
|
|
|
|
|
|
|
|
|
String to_string() const;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
ComponentType m_type;
|
|
|
|
|
Token m_token;
|
|
|
|
|
StyleFunctionRule m_function;
|
|
|
|
|
StyleBlockRule m_block;
|
|
|
|
|
};
|
|
|
|
|
}
|