1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:07:35 +00:00

LibWeb: Give CSS Token and StyleComponentValueRule matching is() funcs

The end goal here is to make the two classes mostly interchangeable, as
the CSS spec requires that the various parser algorithms can take a
stream of either class, and we want to have that functionality without
needing to duplicate all of the code.
This commit is contained in:
Sam Atkins 2021-07-03 15:06:53 +01:00 committed by Andreas Kling
parent 9c14504bbb
commit 6c03123b2d
5 changed files with 72 additions and 102 deletions

View file

@ -207,7 +207,7 @@ Vector<Token> Tokenizer::parse()
auto token = consume_a_token();
tokens.append(token);
if (token.is_eof()) {
if (token.is(Token::Type::EndOfFile)) {
return tokens;
}
}