| 764 | } |
| 765 | |
| 766 | BAN::ErrorOr<void> TokenParser::run(BAN::Vector<Token>&& tokens) |
| 767 | { |
| 768 | TRY(feed_tokens(BAN::move(tokens))); |
| 769 | |
| 770 | BAN::ScopeGuard _([this] { |
| 771 | m_token_stream.clear(); |
| 772 | }); |
| 773 | |
| 774 | auto command_tree = TRY(parse_command_tree()); |
| 775 | |
| 776 | const auto token_type = peek_token().type(); |
| 777 | if (token_type != Token::Type::EOF_) |
| 778 | return unexpected_token_error(token_type); |
| 779 | |
| 780 | TRY(m_execute.execute_command(command_tree)); |
| 781 | return {}; |
| 782 | } |
| 783 | |
| 784 | bool TokenParser::main_loop(bool break_on_error) |
| 785 | { |
nothing calls this directly
no test coverage detected