#ifndef _CLI_EXECUTE_COMMAND_H_
#define _CLI_EXECUTE_COMMAND_H_

#include <command/Command.h>
#include <environment/Environment.h>
#include <ast/Statement.h>

namespace cli {

class ExecuteCommand : public Command {
	std::shared_ptr < Statement > m_command;

public:
	ExecuteCommand ( std::shared_ptr < StatementList > command ) : m_command ( std::move ( command ) ) {
	}

	Command::Result run ( Environment & environment ) const override {
		m_command->translateAndEval ( nullptr, environment );
		return Command::Result::OK;
	}
};

} /* namespace cli */

#endif /* _CLI_EXECUTE_COMMAND_H_ */
