mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 10:18:15 +09:00
LibCpp: Use lex_iterable() where applicable
This commit is contained in:
parent
606e05852f
commit
f91974677c
Notes:
sideshowbarker
2024-07-18 05:25:46 +09:00
Author: https://github.com/itamar8910
Commit: f91974677c
Pull-request: https://github.com/SerenityOS/serenity/pull/9528
Reviewed-by: https://github.com/alimpfard
3 changed files with 12 additions and 16 deletions
|
@ -24,9 +24,7 @@ int main(int argc, char** argv)
|
|||
StringView content_view(content);
|
||||
|
||||
Cpp::Lexer lexer(content);
|
||||
auto tokens = lexer.lex();
|
||||
|
||||
for (auto& token : tokens) {
|
||||
lexer.lex_iterable([](auto token) {
|
||||
outln("{}", token.to_string());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue