1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:47:34 +00:00

LibWeb: Rename CSS::Token::TokenType -> Type

This commit is contained in:
Sam Atkins 2021-07-09 20:54:06 +01:00 committed by Andreas Kling
parent 8671d79ba4
commit 9c14504bbb
6 changed files with 124 additions and 124 deletions

View file

@ -17,7 +17,7 @@ class Token {
friend class Tokenizer;
public:
enum class TokenType {
enum class Type {
Invalid,
EndOfFile,
Ident,
@ -56,33 +56,33 @@ public:
Number,
};
bool is_eof() const { return m_type == TokenType::EndOfFile; }
bool is_ident() const { return m_type == TokenType::Ident; }
bool is_function() const { return m_type == TokenType::Function; }
bool is_at() const { return m_type == TokenType::AtKeyword; }
bool is_hash() const { return m_type == TokenType::Hash; }
bool is_string() const { return m_type == TokenType::String; }
bool is_bad_string() const { return m_type == TokenType::BadString; }
bool is_url() const { return m_type == TokenType::Url; }
bool is_bad_url() const { return m_type == TokenType::BadUrl; }
bool is_delim() const { return m_type == TokenType::Delim; }
bool is_number() const { return m_type == TokenType::Number; }
bool is_percentage() const { return m_type == TokenType::Percentage; }
bool is_dimension() const { return m_type == TokenType::Dimension; }
bool is_whitespace() const { return m_type == TokenType::Whitespace; }
bool is_cdo() const { return m_type == TokenType::CDO; }
bool is_cdc() const { return m_type == TokenType::CDC; }
bool is_colon() const { return m_type == TokenType::Colon; }
bool is_semicolon() const { return m_type == TokenType::Semicolon; }
bool is_comma() const { return m_type == TokenType::Comma; }
bool is_open_square() const { return m_type == TokenType::OpenSquare; }
bool is_close_square() const { return m_type == TokenType::CloseSquare; }
bool is_open_paren() const { return m_type == TokenType::OpenParen; }
bool is_close_paren() const { return m_type == TokenType::CloseParen; }
bool is_open_curly() const { return m_type == TokenType::OpenCurly; }
bool is_close_curly() const { return m_type == TokenType::CloseCurly; }
bool is_eof() const { return m_type == Type::EndOfFile; }
bool is_ident() const { return m_type == Type::Ident; }
bool is_function() const { return m_type == Type::Function; }
bool is_at() const { return m_type == Type::AtKeyword; }
bool is_hash() const { return m_type == Type::Hash; }
bool is_string() const { return m_type == Type::String; }
bool is_bad_string() const { return m_type == Type::BadString; }
bool is_url() const { return m_type == Type::Url; }
bool is_bad_url() const { return m_type == Type::BadUrl; }
bool is_delim() const { return m_type == Type::Delim; }
bool is_number() const { return m_type == Type::Number; }
bool is_percentage() const { return m_type == Type::Percentage; }
bool is_dimension() const { return m_type == Type::Dimension; }
bool is_whitespace() const { return m_type == Type::Whitespace; }
bool is_cdo() const { return m_type == Type::CDO; }
bool is_cdc() const { return m_type == Type::CDC; }
bool is_colon() const { return m_type == Type::Colon; }
bool is_semicolon() const { return m_type == Type::Semicolon; }
bool is_comma() const { return m_type == Type::Comma; }
bool is_open_square() const { return m_type == Type::OpenSquare; }
bool is_close_square() const { return m_type == Type::CloseSquare; }
bool is_open_paren() const { return m_type == Type::OpenParen; }
bool is_close_paren() const { return m_type == Type::CloseParen; }
bool is_open_curly() const { return m_type == Type::OpenCurly; }
bool is_close_curly() const { return m_type == Type::CloseCurly; }
bool is(TokenType type) const { return m_type == type; }
bool is(Type type) const { return m_type == type; }
StringView ident() const
{
@ -102,13 +102,13 @@ public:
return m_value.string_view();
}
TokenType mirror_variant() const;
Type mirror_variant() const;
String bracket_string() const;
String bracket_mirror_string() const;
String to_string() const;
private:
TokenType m_type { TokenType::Invalid };
Type m_type { Type::Invalid };
StringBuilder m_value;
StringBuilder m_unit;