Move enum_ and leaf_data_ to a separate header
Change-Id: Ia92f9707fb43d39a95bd58aff189aa2a9f7d24c4
diff --git a/src/ast_commands.hpp b/src/ast_commands.hpp
index d7d47c9..a27b09c 100644
--- a/src/ast_commands.hpp
+++ b/src/ast_commands.hpp
@@ -8,6 +8,7 @@
#pragma once
#include "ast_path.hpp"
+#include "ast_values.hpp"
namespace x3 = boost::spirit::x3;
namespace ascii = boost::spirit::x3::ascii;
@@ -48,20 +49,6 @@
path_ m_path;
};
-struct enum_ {
- enum_();
- enum_(const std::string& value);
- bool operator==(const enum_& b) const;
- std::string m_value;
-};
-
-using leaf_data_ = boost::variant<enum_,
- double,
- bool,
- int32_t,
- uint32_t,
- std::string>;
-
struct set_ : x3::position_tagged {
bool operator==(const set_& b) const;
path_ m_path;
diff --git a/src/ast_values.hpp b/src/ast_values.hpp
new file mode 100644
index 0000000..121e760
--- /dev/null
+++ b/src/ast_values.hpp
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2018 CESNET, https://photonics.cesnet.cz/
+ * Copyright (C) 2018 FIT CVUT, https://fit.cvut.cz/
+ *
+ * Written by Václav Kubernát <kubervac@fit.cvut.cz>
+ *
+*/
+#pragma once
+
+#include <boost/variant.hpp>
+
+struct enum_ {
+ enum_();
+ enum_(const std::string& value);
+ bool operator==(const enum_& b) const;
+ std::string m_value;
+};
+
+using leaf_data_ = boost::variant<enum_,
+ double,
+ bool,
+ int32_t,
+ uint32_t,
+ std::string>;
+