1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 08:14:58 +00:00

LibCpp: Use lex_iterable() where applicable

This commit is contained in:
Itamar 2021-08-21 16:48:21 +03:00 committed by Andreas Kling
parent 606e05852f
commit f91974677c
3 changed files with 12 additions and 16 deletions

View file

@ -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());
}
});
}