Rework ls interpreter to use resolvePath
This has a side-effect that availableNodes is called with a dataPath_ if
ls had a dataPath_ originally. There is no difference, because first
thing availableNodes does is convert everything to dataPath_ anyway.
Change-Id: Iaffa53e4a19523d304c5477b84552be058eab5ba
diff --git a/src/interpreter.hpp b/src/interpreter.hpp
index 67940c8..e008375 100644
--- a/src/interpreter.hpp
+++ b/src/interpreter.hpp
@@ -12,6 +12,7 @@
#include "datastore_access.hpp"
#include "parser.hpp"
+
struct Interpreter : boost::static_visitor<void> {
Interpreter(Parser& parser, DatastoreAccess& datastore);
@@ -32,10 +33,10 @@
std::string buildTypeInfo(const std::string& path) const;
template <typename PathType>
- std::string toCanonicalPath(const boost::optional<PathType>& path) const;
+ boost::variant<dataPath_, schemaPath_, module_> toCanonicalPath(const boost::optional<PathType>& path) const;
template <typename PathType>
- std::string toCanonicalPath(const PathType& path) const;
+ boost::variant<dataPath_, schemaPath_, module_> toCanonicalPath(const PathType& path) const;
Parser& m_parser;
DatastoreAccess& m_datastore;