Add support for leaflist

Change-Id: Idcb529f85240a32e84d82934c81fcf0c3451f94e
diff --git a/src/ast_path.cpp b/src/ast_path.cpp
index 0aa839c..b9b9b5a 100644
--- a/src/ast_path.cpp
+++ b/src/ast_path.cpp
@@ -26,6 +26,23 @@
 {
 }
 
+bool leafListElement_::operator==(const leafListElement_& b) const
+{
+    return this->m_name == b.m_name && this->m_value == b.m_value;
+}
+
+leafList_::leafList_() = default;
+
+leafList_::leafList_(const std::string& name)
+    : m_name(name)
+{
+}
+
+bool leafList_::operator==(const leafList_& b) const
+{
+    return this->m_name == b.m_name;
+}
+
 bool module_::operator==(const module_& b) const
 {
     return this->m_name == b.m_name;
@@ -142,6 +159,10 @@
         res << "]";
         return res.str();
     }
+    std::string operator()(const leafListElement_& node) const
+    {
+        return node.m_name + "[.=" + escapeListKeyString(leafDataToString(node.m_value)) + "]";
+    }
     std::string operator()(const nodeup_&) const
     {
         return "..";
@@ -202,6 +223,11 @@
         return list_{listElement.m_name};
     }
 
+    auto operator()(const leafListElement_& leafListElement) const
+    {
+        return leafList_{leafListElement.m_name};
+    }
+
     template <typename T>
     auto operator()(const T& suffix) const
     {