Add support for `empty` YANG leaf type
Change-Id: I87eafae9df9accdaa4579ace769996e70da6cb1c
diff --git a/src/utils.cpp b/src/utils.cpp
index 665aedd..3543787 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -123,6 +123,10 @@
{
return "a leafref";
}
+ std::string operator()(const yang::Empty&)
+ {
+ return "an empty leaf";
+ }
std::string operator()(const yang::Union& type)
{
std::ostringstream ss;
@@ -163,6 +167,11 @@
return data.m_value;
}
+ std::string operator()(const empty_) const
+ {
+ return "[empty]";
+ }
+
std::string operator()(const identityRef_& data) const
{
return data.m_prefix ? (data.m_prefix.value().m_name + ":" + data.m_value) : data.m_value;