2026-04-15 07:53:15 -03:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2026, the Ladybird developers.
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <AK/StringView.h>
|
|
|
|
|
#include <AK/Vector.h>
|
|
|
|
|
#include <LibWeb/CSS/Parser/Token.h>
|
2026-05-18 07:52:17 -03:00
|
|
|
#include <LibWeb/CSS/Parser/Tokenizer.h>
|
2026-04-15 07:53:15 -03:00
|
|
|
#include <LibWeb/Export.h>
|
|
|
|
|
|
|
|
|
|
namespace Web::CSS::Parser::FFI {
|
|
|
|
|
|
|
|
|
|
struct CssToken;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
namespace Web::CSS::Parser {
|
|
|
|
|
|
|
|
|
|
class WEB_API RustTokenizer {
|
|
|
|
|
public:
|
2026-05-18 07:52:17 -03:00
|
|
|
static Vector<Token> tokenize(StringView input, StringView encoding, TokenizerInput = TokenizerInput::DecodedText);
|
2026-04-15 07:53:15 -03:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
static Token token_from_ffi(FFI::CssToken const&);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|