MCPcopy Create free account
hub / github.com/Bananymous/banan-os / run

Method run

userspace/programs/Shell/TokenParser.cpp:766–782  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

764}
765
766BAN::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
784bool TokenParser::main_loop(bool break_on_error)
785{

Callers

nothing calls this directly

Calls 4

unexpected_token_errorFunction · 0.85
execute_commandMethod · 0.80
clearMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected