#pragma once
#include <cstddef>
#include <string>
#include <optional>
namespace solidity::frontend
{
enum class RevertStrings
{
Default, Strip, Debug, VerboseDebug };
inline std::string revertStringsToString(RevertStrings _str)
{
switch (_str)
{
case RevertStrings::Default: return "default";
case RevertStrings::Strip: return "strip";
case RevertStrings::Debug: return "debug";
case RevertStrings::VerboseDebug: return "verboseDebug";
}
return "INVALID";
}
inline std::optional<RevertStrings> revertStringsFromString(std::string const& _str)
{
for (auto i: {RevertStrings::Default, RevertStrings::Strip, RevertStrings::Debug, RevertStrings::VerboseDebug})
if (revertStringsToString(i) == _str)
return i;
return std::nullopt;
}
}