LibWeb: Move Token and Tokenizer into Parser namespace

This commit is contained in:
Sam Atkins 2022-04-12 15:10:08 +01:00 committed by Andreas Kling
commit bf786d66b1
Notes: sideshowbarker 2024-07-17 11:52:11 +09:00
8 changed files with 52 additions and 51 deletions

View file

@ -9,7 +9,7 @@
#include <LibWeb/CSS/Parser/Token.h>
#include <LibWeb/CSS/Serialize.h>
namespace Web::CSS {
namespace Web::CSS::Parser {
String Token::to_string() const
{

View file

@ -12,7 +12,7 @@
#include <AK/Utf8View.h>
#include <LibWeb/CSS/Number.h>
namespace Web::CSS {
namespace Web::CSS::Parser {
class Token {
friend class Tokenizer;

View file

@ -13,6 +13,8 @@
#include <LibWeb/CSS/Parser/Tokenizer.h>
#include <math.h>
namespace Web::CSS::Parser {
// U+FFFD REPLACEMENT CHARACTER (<28>)
#define REPLACEMENT_CHARACTER 0xFFFD
static constexpr u32 TOKENIZER_EOF = 0xFFFFFFFF;
@ -190,8 +192,6 @@ static inline bool is_E(u32 code_point)
return code_point == 0x45;
}
namespace Web::CSS {
Tokenizer::Tokenizer(StringView input, String const& encoding)
{
auto* decoder = TextCodec::decoder_for(encoding);

View file

@ -14,7 +14,7 @@
#include <LibWeb/CSS/Parser/Token.h>
#include <LibWeb/Forward.h>
namespace Web::CSS {
namespace Web::CSS::Parser {
class U32Twin {
public: