mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibWeb: Propagate errors from CSS Tokenizer construction
Instead of constructing a Tokenizer and then calling parse() on it, we now call `Tokenizer::tokenize(...)` directly. (Renamed from `parse()` because this is a Tokenizer, not a Parser.)
This commit is contained in:
committed by
Andreas Kling
parent
98ee2fcd1b
commit
17618989a3
@@ -45,8 +45,7 @@ void SyntaxHighlighter::rehighlight(Palette const& palette)
|
||||
false);
|
||||
};
|
||||
|
||||
CSS::Parser::Tokenizer tokenizer { text, "utf-8"sv };
|
||||
auto tokens = tokenizer.parse();
|
||||
auto tokens = CSS::Parser::Tokenizer::tokenize(text, "utf-8"sv).release_value_but_fixme_should_propagate_errors();
|
||||
for (auto const& token : tokens) {
|
||||
if (token.is(Parser::Token::Type::EndOfFile))
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user