Add special type for representing special values
Before this, pseudo-values like lists and containers were represented by
a string leaf value. Now, I can tell these values apart. This can be
helpful for filtering (for example, when printing the values). It will
also be used for implementing key value completion.
Change-Id: I48f6fa2facaf3e8e52aa3b3b4d92130e63acdb6f
diff --git a/src/ast_values.hpp b/src/ast_values.hpp
index 44e98af..b2f2c3a 100644
--- a/src/ast_values.hpp
+++ b/src/ast_values.hpp
@@ -38,9 +38,23 @@
std::string m_value;
};
+enum class SpecialValue {
+ List,
+ Container,
+ PresenceContainer
+};
+
+struct special_ {
+ bool operator==(const special_& b) const;
+ SpecialValue m_value;
+};
+
+std::string specialValueToString(const special_& value);
+
using leaf_data_ = boost::variant<enum_,
binary_,
identityRef_,
+ special_,
double,
bool,
int8_t,