blob: 91eb3f2dfc62eb58a6a1b721e5570fb2c2ab7827 [file] [log] [blame]
Václav Kubernát3a99f002020-03-31 02:27:41 +02001#include <algorithm>
Václav Kubernát385dcdd2020-11-25 17:46:54 +01002#include "ast_values.hpp"
Václav Kubernát3a99f002020-03-31 02:27:41 +02003#include "leaf_data_type.hpp"
4yang::Enum createEnum(const std::initializer_list<const char*>& list)
5{
6 std::set<enum_> enums;
7 std::transform(list.begin(), list.end(), std::inserter(enums, enums.end()), [](const auto& value) {
8 return enum_{value};
9 });
10 return yang::Enum(std::move(enums));
11}