mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:38:11 +00:00
LibWeb: Add TokenStream class to CSS Parser
The entry points for CSS parsing in the spec are defined as accepting any of a stream of Tokens, or a stream of ComponentValues, or a String. TokenStream is an attempt to reduce the duplication of code for that.
This commit is contained in:
parent
6c03123b2d
commit
b7116711bf
4 changed files with 119 additions and 47 deletions
|
@ -269,6 +269,11 @@ Token Tokenizer::create_new_token(Token::Type type)
|
|||
return token;
|
||||
}
|
||||
|
||||
Token Tokenizer::create_eof_token()
|
||||
{
|
||||
return create_new_token(Token::Type::EndOfFile);
|
||||
}
|
||||
|
||||
Token Tokenizer::create_value_token(Token::Type type, String value)
|
||||
{
|
||||
Token token;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue