Václav Kubernát | 96344a1 | 2018-05-28 16:33:39 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2018 CESNET, https://photonics.cesnet.cz/ |
| 3 | * Copyright (C) 2018 FIT CVUT, https://fit.cvut.cz/ |
| 4 | * |
| 5 | * Written by Václav Kubernát <kubervac@fit.cvut.cz> |
| 6 | * |
| 7 | */ |
| 8 | |
Václav Kubernát | 5b8a8f3 | 2020-05-20 00:57:22 +0200 | [diff] [blame] | 9 | #include <boost/algorithm/string/predicate.hpp> |
Václav Kubernát | 509ce65 | 2019-05-29 19:46:44 +0200 | [diff] [blame] | 10 | #include <boost/mpl/for_each.hpp> |
Václav Kubernát | b61336d | 2018-05-28 17:35:03 +0200 | [diff] [blame] | 11 | #include <iostream> |
Václav Kubernát | 9cfcd87 | 2020-02-18 12:34:02 +0100 | [diff] [blame] | 12 | #include <sstream> |
Václav Kubernát | 6415b82 | 2018-08-22 17:40:01 +0200 | [diff] [blame] | 13 | #include "datastore_access.hpp" |
Václav Kubernát | 96344a1 | 2018-05-28 16:33:39 +0200 | [diff] [blame] | 14 | #include "interpreter.hpp" |
Václav Kubernát | 509ce65 | 2019-05-29 19:46:44 +0200 | [diff] [blame] | 15 | #include "utils.hpp" |
Václav Kubernát | 96344a1 | 2018-05-28 16:33:39 +0200 | [diff] [blame] | 16 | |
Václav Kubernát | 4c3d22f | 2020-06-12 16:05:01 +0200 | [diff] [blame] | 17 | struct pathToStringVisitor : boost::static_visitor<std::string> { |
| 18 | std::string operator()(const module_& path) const |
| 19 | { |
| 20 | using namespace std::string_literals; |
| 21 | return "/"s + boost::get<module_>(path).m_name + ":*"; |
| 22 | } |
| 23 | std::string operator()(const schemaPath_& path) const |
| 24 | { |
| 25 | return pathToSchemaString(path, Prefixes::WhenNeeded); |
| 26 | } |
| 27 | std::string operator()(const dataPath_& path) const |
| 28 | { |
| 29 | return pathToDataString(path, Prefixes::WhenNeeded); |
| 30 | } |
| 31 | }; |
| 32 | |
| 33 | template <typename PathType> |
| 34 | std::string pathToString(const PathType& path) |
| 35 | { |
| 36 | return boost::apply_visitor(pathToStringVisitor(), path); |
| 37 | } |
| 38 | |
Václav Kubernát | 812ee28 | 2018-08-30 17:10:03 +0200 | [diff] [blame] | 39 | void Interpreter::operator()(const commit_&) const |
| 40 | { |
| 41 | m_datastore.commitChanges(); |
| 42 | } |
| 43 | |
Václav Kubernát | 6d79143 | 2018-10-25 16:00:35 +0200 | [diff] [blame] | 44 | void Interpreter::operator()(const discard_&) const |
| 45 | { |
| 46 | m_datastore.discardChanges(); |
| 47 | } |
| 48 | |
Václav Kubernát | 0720424 | 2018-06-04 18:12:09 +0200 | [diff] [blame] | 49 | void Interpreter::operator()(const set_& set) const |
| 50 | { |
Václav Kubernát | eeb3884 | 2019-03-20 19:46:05 +0100 | [diff] [blame] | 51 | auto data = set.m_data; |
| 52 | |
| 53 | // If the user didn't supply a module prefix for identityref, we need to add it ourselves |
| 54 | if (data.type() == typeid(identityRef_)) { |
| 55 | auto identityRef = boost::get<identityRef_>(data); |
| 56 | if (!identityRef.m_prefix) { |
| 57 | identityRef.m_prefix = set.m_path.m_nodes.front().m_prefix.value(); |
| 58 | data = identityRef; |
| 59 | } |
| 60 | } |
Václav Kubernát | 4c3d22f | 2020-06-12 16:05:01 +0200 | [diff] [blame] | 61 | m_datastore.setLeaf(pathToString(toCanonicalPath(set.m_path)), data); |
Václav Kubernát | 0720424 | 2018-06-04 18:12:09 +0200 | [diff] [blame] | 62 | } |
| 63 | |
Václav Kubernát | b6ff0b6 | 2018-08-30 16:14:53 +0200 | [diff] [blame] | 64 | void Interpreter::operator()(const get_& get) const |
| 65 | { |
Václav Kubernát | 4c3d22f | 2020-06-12 16:05:01 +0200 | [diff] [blame] | 66 | auto items = m_datastore.getItems(pathToString(toCanonicalPath(get.m_path))); |
Václav Kubernát | 5b8a8f3 | 2020-05-20 00:57:22 +0200 | [diff] [blame] | 67 | for (auto it = items.begin(); it != items.end(); it++) { |
| 68 | auto [path, value] = *it; |
| 69 | if (value.type() == typeid(special_) && boost::get<special_>(value).m_value == SpecialValue::LeafList) { |
| 70 | auto leafListPrefix = path; |
| 71 | std::cout << path << " = " << leafDataToString(value) << std::endl; |
Václav Kubernát | fb4bda6 | 2020-06-09 12:54:41 +0200 | [diff] [blame] | 72 | |
| 73 | while (it + 1 != items.end() && boost::starts_with((it + 1) ->first, leafListPrefix)) { |
Václav Kubernát | 5b8a8f3 | 2020-05-20 00:57:22 +0200 | [diff] [blame] | 74 | ++it; |
Václav Kubernát | fb4bda6 | 2020-06-09 12:54:41 +0200 | [diff] [blame] | 75 | std::cout << stripLeafListValueFromPath(it->first) << " = " << leafDataToString(it->second) << std::endl; |
Václav Kubernát | 5b8a8f3 | 2020-05-20 00:57:22 +0200 | [diff] [blame] | 76 | } |
| 77 | } else { |
| 78 | std::cout << path << " = " << leafDataToString(value) << std::endl; |
| 79 | } |
Václav Kubernát | b6ff0b6 | 2018-08-30 16:14:53 +0200 | [diff] [blame] | 80 | } |
| 81 | } |
| 82 | |
Václav Kubernát | 96344a1 | 2018-05-28 16:33:39 +0200 | [diff] [blame] | 83 | void Interpreter::operator()(const cd_& cd) const |
| 84 | { |
| 85 | m_parser.changeNode(cd.m_path); |
| 86 | } |
| 87 | |
Václav Kubernát | b61336d | 2018-05-28 17:35:03 +0200 | [diff] [blame] | 88 | void Interpreter::operator()(const create_& create) const |
| 89 | { |
Václav Kubernát | b5ca154 | 2020-05-27 01:03:54 +0200 | [diff] [blame] | 90 | if (std::holds_alternative<listElement_>(create.m_path.m_nodes.back().m_suffix)) |
Václav Kubernát | 4c3d22f | 2020-06-12 16:05:01 +0200 | [diff] [blame] | 91 | m_datastore.createListInstance(pathToString(toCanonicalPath(create.m_path))); |
Václav Kubernát | b5ca154 | 2020-05-27 01:03:54 +0200 | [diff] [blame] | 92 | else if (std::holds_alternative<leafListElement_>(create.m_path.m_nodes.back().m_suffix)) |
Václav Kubernát | 4c3d22f | 2020-06-12 16:05:01 +0200 | [diff] [blame] | 93 | m_datastore.createLeafListInstance(pathToString(toCanonicalPath(create.m_path))); |
Václav Kubernát | be22862 | 2019-05-23 14:44:12 +0200 | [diff] [blame] | 94 | else |
Václav Kubernát | 4c3d22f | 2020-06-12 16:05:01 +0200 | [diff] [blame] | 95 | m_datastore.createPresenceContainer(pathToString(toCanonicalPath(create.m_path))); |
Václav Kubernát | b61336d | 2018-05-28 17:35:03 +0200 | [diff] [blame] | 96 | } |
| 97 | |
| 98 | void Interpreter::operator()(const delete_& delet) const |
| 99 | { |
Václav Kubernát | b5ca154 | 2020-05-27 01:03:54 +0200 | [diff] [blame] | 100 | if (std::holds_alternative<container_>(delet.m_path.m_nodes.back().m_suffix)) |
Václav Kubernát | 4c3d22f | 2020-06-12 16:05:01 +0200 | [diff] [blame] | 101 | m_datastore.deletePresenceContainer(pathToString(toCanonicalPath(delet.m_path))); |
Václav Kubernát | b5ca154 | 2020-05-27 01:03:54 +0200 | [diff] [blame] | 102 | else if (std::holds_alternative<leafListElement_>(delet.m_path.m_nodes.back().m_suffix)) |
Václav Kubernát | 4c3d22f | 2020-06-12 16:05:01 +0200 | [diff] [blame] | 103 | m_datastore.deleteLeafListInstance(pathToString(toCanonicalPath(delet.m_path))); |
Václav Kubernát | f5f64f0 | 2019-03-19 17:15:47 +0100 | [diff] [blame] | 104 | else |
Václav Kubernát | 4c3d22f | 2020-06-12 16:05:01 +0200 | [diff] [blame] | 105 | m_datastore.deleteListInstance(pathToString(toCanonicalPath(delet.m_path))); |
Václav Kubernát | b61336d | 2018-05-28 17:35:03 +0200 | [diff] [blame] | 106 | } |
| 107 | |
Václav Kubernát | 11afac7 | 2018-07-18 14:59:53 +0200 | [diff] [blame] | 108 | void Interpreter::operator()(const ls_& ls) const |
| 109 | { |
| 110 | std::cout << "Possible nodes:" << std::endl; |
Václav Kubernát | e7d4aea | 2018-09-11 18:15:48 +0200 | [diff] [blame] | 111 | auto recursion{Recursion::NonRecursive}; |
| 112 | for (auto it : ls.m_options) { |
| 113 | if (it == LsOption::Recursive) |
| 114 | recursion = Recursion::Recursive; |
| 115 | } |
Václav Kubernát | 11afac7 | 2018-07-18 14:59:53 +0200 | [diff] [blame] | 116 | |
Václav Kubernát | 4c3d22f | 2020-06-12 16:05:01 +0200 | [diff] [blame] | 117 | auto toPrint = m_datastore.schema()->availableNodes(toCanonicalPath(ls.m_path), recursion); |
Václav Kubernát | 8208687 | 2020-04-29 01:09:50 +0200 | [diff] [blame] | 118 | |
Václav Kubernát | 95b0887 | 2020-04-28 01:04:17 +0200 | [diff] [blame] | 119 | for (const auto& it : toPrint) { |
| 120 | std::cout << (it.first ? *it.first + ":" : "" ) + it.second << std::endl; |
| 121 | } |
Václav Kubernát | 11afac7 | 2018-07-18 14:59:53 +0200 | [diff] [blame] | 122 | } |
| 123 | |
Václav Kubernát | 7160a13 | 2020-04-03 02:11:01 +0200 | [diff] [blame] | 124 | void Interpreter::operator()(const copy_& copy) const |
| 125 | { |
| 126 | m_datastore.copyConfig(copy.m_source, copy.m_destination); |
| 127 | } |
| 128 | |
Václav Kubernát | 9cfcd87 | 2020-02-18 12:34:02 +0100 | [diff] [blame] | 129 | std::string Interpreter::buildTypeInfo(const std::string& path) const |
| 130 | { |
| 131 | std::ostringstream ss; |
| 132 | switch (m_datastore.schema()->nodeType(path)) { |
| 133 | case yang::NodeTypes::Container: |
| 134 | ss << "container"; |
| 135 | break; |
| 136 | case yang::NodeTypes::PresenceContainer: |
| 137 | ss << "presence container"; |
| 138 | break; |
| 139 | case yang::NodeTypes::Leaf: |
| 140 | { |
| 141 | auto leafType = m_datastore.schema()->leafType(path); |
| 142 | auto typedefName = m_datastore.schema()->leafTypeName(path); |
| 143 | std::string baseTypeStr; |
Václav Kubernát | 13b23d7 | 2020-04-16 21:49:51 +0200 | [diff] [blame] | 144 | if (std::holds_alternative<yang::LeafRef>(leafType.m_type)) { |
Václav Kubernát | 9cfcd87 | 2020-02-18 12:34:02 +0100 | [diff] [blame] | 145 | ss << "-> "; |
| 146 | ss << m_datastore.schema()->leafrefPath(path) << " "; |
Václav Kubernát | 13b23d7 | 2020-04-16 21:49:51 +0200 | [diff] [blame] | 147 | baseTypeStr = leafDataTypeToString(std::get<yang::LeafRef>(leafType.m_type).m_targetType->m_type); |
Václav Kubernát | 9cfcd87 | 2020-02-18 12:34:02 +0100 | [diff] [blame] | 148 | } else { |
Václav Kubernát | 13b23d7 | 2020-04-16 21:49:51 +0200 | [diff] [blame] | 149 | baseTypeStr = leafDataTypeToString(leafType.m_type); |
Václav Kubernát | 9cfcd87 | 2020-02-18 12:34:02 +0100 | [diff] [blame] | 150 | } |
| 151 | |
| 152 | if (typedefName) { |
| 153 | ss << *typedefName << " (" << baseTypeStr << ")"; |
| 154 | } else { |
| 155 | ss << baseTypeStr; |
| 156 | } |
| 157 | |
Václav Kubernát | 13b23d7 | 2020-04-16 21:49:51 +0200 | [diff] [blame] | 158 | if (leafType.m_units) { |
| 159 | ss << " [" + *leafType.m_units + "]"; |
Václav Kubernát | 9cfcd87 | 2020-02-18 12:34:02 +0100 | [diff] [blame] | 160 | } |
| 161 | |
| 162 | if (m_datastore.schema()->leafIsKey(path)) { |
| 163 | ss << " (key)"; |
| 164 | } |
Václav Kubernát | b1a75c6 | 2020-04-21 15:20:16 +0200 | [diff] [blame] | 165 | |
| 166 | if (auto defaultValue = m_datastore.schema()->defaultValue(path)) { |
| 167 | ss << " default: " << leafDataToString(*defaultValue); |
| 168 | } |
Václav Kubernát | 9cfcd87 | 2020-02-18 12:34:02 +0100 | [diff] [blame] | 169 | break; |
| 170 | } |
| 171 | case yang::NodeTypes::List: |
| 172 | ss << "list"; |
| 173 | break; |
Václav Kubernát | aaafeae | 2020-05-05 15:41:45 +0200 | [diff] [blame] | 174 | case yang::NodeTypes::Action: |
| 175 | case yang::NodeTypes::AnyXml: |
| 176 | case yang::NodeTypes::LeafList: |
| 177 | case yang::NodeTypes::Notification: |
| 178 | case yang::NodeTypes::Rpc: |
| 179 | throw std::logic_error("describe got an rpc or an action: this should never happen, because their paths cannot be parsed"); |
Václav Kubernát | 9cfcd87 | 2020-02-18 12:34:02 +0100 | [diff] [blame] | 180 | } |
Václav Kubernát | 0599e9f | 2020-04-21 09:51:33 +0200 | [diff] [blame] | 181 | |
| 182 | if (!m_datastore.schema()->isConfig(path)) { |
| 183 | ss << " (ro)"; |
| 184 | } |
| 185 | |
Václav Kubernát | 9cfcd87 | 2020-02-18 12:34:02 +0100 | [diff] [blame] | 186 | return ss.str(); |
| 187 | } |
| 188 | |
| 189 | void Interpreter::operator()(const describe_& describe) const |
| 190 | { |
Václav Kubernát | 4c3d22f | 2020-06-12 16:05:01 +0200 | [diff] [blame] | 191 | auto path = pathToString(toCanonicalPath(describe.m_path)); |
Václav Kubernát | a1c4c9e | 2020-04-22 00:37:52 +0200 | [diff] [blame] | 192 | auto status = m_datastore.schema()->status(path); |
| 193 | auto statusStr = status == yang::Status::Deprecated ? " (deprecated)" : |
| 194 | status == yang::Status::Obsolete ? " (obsolete)" : |
| 195 | ""; |
| 196 | |
| 197 | std::cout << path << ": " << buildTypeInfo(path) << statusStr << std::endl; |
Václav Kubernát | 9cfcd87 | 2020-02-18 12:34:02 +0100 | [diff] [blame] | 198 | if (auto description = m_datastore.schema()->description(path)) { |
| 199 | std::cout << std::endl << *description << std::endl; |
| 200 | } |
| 201 | } |
| 202 | |
Václav Kubernát | bf65dd7 | 2020-05-28 02:32:31 +0200 | [diff] [blame] | 203 | void Interpreter::operator()(const move_& move) const |
| 204 | { |
| 205 | m_datastore.moveItem(pathToDataString(move.m_source, Prefixes::WhenNeeded), move.m_destination); |
| 206 | } |
| 207 | |
Václav Kubernát | 054cc99 | 2019-02-21 14:23:52 +0100 | [diff] [blame] | 208 | struct commandLongHelpVisitor : boost::static_visitor<const char*> { |
| 209 | template <typename T> |
| 210 | auto constexpr operator()(boost::type<T>) const |
| 211 | { |
| 212 | return T::longHelp; |
| 213 | } |
| 214 | }; |
| 215 | |
| 216 | struct commandShortHelpVisitor : boost::static_visitor<const char*> { |
| 217 | template <typename T> |
| 218 | auto constexpr operator()(boost::type<T>) const |
| 219 | { |
| 220 | return T::shortHelp; |
| 221 | } |
| 222 | }; |
| 223 | |
| 224 | void Interpreter::operator()(const help_& help) const |
| 225 | { |
| 226 | if (help.m_cmd) |
| 227 | std::cout << boost::apply_visitor(commandLongHelpVisitor(), help.m_cmd.get()) << std::endl; |
| 228 | else |
| 229 | boost::mpl::for_each<CommandTypes, boost::type<boost::mpl::_>>([](auto cmd) { |
| 230 | std::cout << commandShortHelpVisitor()(cmd) << std::endl; |
| 231 | }); |
| 232 | } |
| 233 | |
Václav Kubernát | 7e16769 | 2020-06-12 09:53:01 +0200 | [diff] [blame] | 234 | template <typename PathType> |
Václav Kubernát | 4c3d22f | 2020-06-12 16:05:01 +0200 | [diff] [blame] | 235 | boost::variant<dataPath_, schemaPath_, module_> Interpreter::toCanonicalPath(const boost::optional<PathType>& optPath) const |
Václav Kubernát | 6415b82 | 2018-08-22 17:40:01 +0200 | [diff] [blame] | 236 | { |
Václav Kubernát | 7e16769 | 2020-06-12 09:53:01 +0200 | [diff] [blame] | 237 | if (!optPath) { |
Václav Kubernát | 4c3d22f | 2020-06-12 16:05:01 +0200 | [diff] [blame] | 238 | return m_parser.currentPath(); |
Václav Kubernát | 7e16769 | 2020-06-12 09:53:01 +0200 | [diff] [blame] | 239 | } |
| 240 | return toCanonicalPath(*optPath); |
Václav Kubernát | 6415b82 | 2018-08-22 17:40:01 +0200 | [diff] [blame] | 241 | } |
| 242 | |
Václav Kubernát | 7e16769 | 2020-06-12 09:53:01 +0200 | [diff] [blame] | 243 | struct impl_toCanonicalPath { |
| 244 | const dataPath_& m_parserPath; |
| 245 | |
Václav Kubernát | 4c3d22f | 2020-06-12 16:05:01 +0200 | [diff] [blame] | 246 | using ReturnType = boost::variant<dataPath_, schemaPath_, module_>; |
| 247 | |
Václav Kubernát | 7e16769 | 2020-06-12 09:53:01 +0200 | [diff] [blame] | 248 | impl_toCanonicalPath(const dataPath_& parserPath) |
| 249 | : m_parserPath(parserPath) |
| 250 | { |
| 251 | } |
Václav Kubernát | 4c3d22f | 2020-06-12 16:05:01 +0200 | [diff] [blame] | 252 | ReturnType operator()(const module_& path) const |
Václav Kubernát | d624799 | 2020-05-27 00:17:56 +0200 | [diff] [blame] | 253 | { |
Václav Kubernát | 4c3d22f | 2020-06-12 16:05:01 +0200 | [diff] [blame] | 254 | return path; |
Václav Kubernát | d624799 | 2020-05-27 00:17:56 +0200 | [diff] [blame] | 255 | } |
Václav Kubernát | 4c3d22f | 2020-06-12 16:05:01 +0200 | [diff] [blame] | 256 | ReturnType operator()(const schemaPath_& path) const |
Václav Kubernát | 5c75b25 | 2018-10-10 18:33:47 +0200 | [diff] [blame] | 257 | { |
Václav Kubernát | 4c3d22f | 2020-06-12 16:05:01 +0200 | [diff] [blame] | 258 | return impl(path); |
Václav Kubernát | 5c75b25 | 2018-10-10 18:33:47 +0200 | [diff] [blame] | 259 | } |
Václav Kubernát | 4c3d22f | 2020-06-12 16:05:01 +0200 | [diff] [blame] | 260 | ReturnType operator()(const dataPath_& path) const |
Václav Kubernát | 5c75b25 | 2018-10-10 18:33:47 +0200 | [diff] [blame] | 261 | { |
Václav Kubernát | 4c3d22f | 2020-06-12 16:05:01 +0200 | [diff] [blame] | 262 | return impl(path); |
Václav Kubernát | 5c75b25 | 2018-10-10 18:33:47 +0200 | [diff] [blame] | 263 | } |
Václav Kubernát | 5c75b25 | 2018-10-10 18:33:47 +0200 | [diff] [blame] | 264 | |
Václav Kubernát | 7e16769 | 2020-06-12 09:53:01 +0200 | [diff] [blame] | 265 | private: |
| 266 | template <typename PathType> |
Václav Kubernát | 4c3d22f | 2020-06-12 16:05:01 +0200 | [diff] [blame] | 267 | ReturnType impl(const PathType& suffix) const |
Václav Kubernát | d624799 | 2020-05-27 00:17:56 +0200 | [diff] [blame] | 268 | { |
Václav Kubernát | 7e16769 | 2020-06-12 09:53:01 +0200 | [diff] [blame] | 269 | PathType res = [this] { |
| 270 | if constexpr (std::is_same<PathType, schemaPath_>()) { |
| 271 | return dataPathToSchemaPath(m_parserPath); |
| 272 | } else { |
| 273 | return m_parserPath; |
| 274 | } |
| 275 | }(); |
Václav Kubernát | d624799 | 2020-05-27 00:17:56 +0200 | [diff] [blame] | 276 | |
Václav Kubernát | 7e16769 | 2020-06-12 09:53:01 +0200 | [diff] [blame] | 277 | if (suffix.m_scope == Scope::Absolute) { |
| 278 | return suffix; |
Václav Kubernát | 9456b5c | 2019-10-02 21:14:52 +0200 | [diff] [blame] | 279 | } |
Václav Kubernát | b6ff0b6 | 2018-08-30 16:14:53 +0200 | [diff] [blame] | 280 | |
Václav Kubernát | 7e16769 | 2020-06-12 09:53:01 +0200 | [diff] [blame] | 281 | for (const auto& fragment : suffix.m_nodes) { |
| 282 | if (std::holds_alternative<nodeup_>(fragment.m_suffix)) { |
| 283 | res.m_nodes.pop_back(); |
| 284 | } else { |
| 285 | res.m_nodes.push_back(fragment); |
| 286 | } |
| 287 | } |
Václav Kubernát | 4c3d22f | 2020-06-12 16:05:01 +0200 | [diff] [blame] | 288 | |
Václav Kubernát | 7e16769 | 2020-06-12 09:53:01 +0200 | [diff] [blame] | 289 | return res; |
| 290 | } |
| 291 | }; |
| 292 | |
| 293 | template <typename PathType> |
Václav Kubernát | 4c3d22f | 2020-06-12 16:05:01 +0200 | [diff] [blame] | 294 | boost::variant<dataPath_, schemaPath_, module_> Interpreter::toCanonicalPath(const PathType& path) const |
Václav Kubernát | 9cfcd87 | 2020-02-18 12:34:02 +0100 | [diff] [blame] | 295 | { |
Václav Kubernát | 7e16769 | 2020-06-12 09:53:01 +0200 | [diff] [blame] | 296 | if constexpr (std::is_same<PathType, dataPath_>()) { |
| 297 | return impl_toCanonicalPath(m_parser.currentPath())(path); |
| 298 | } else { |
| 299 | return boost::apply_visitor(impl_toCanonicalPath(m_parser.currentPath()), path); |
| 300 | } |
Václav Kubernát | 9cfcd87 | 2020-02-18 12:34:02 +0100 | [diff] [blame] | 301 | } |
| 302 | |
Václav Kubernát | 6415b82 | 2018-08-22 17:40:01 +0200 | [diff] [blame] | 303 | Interpreter::Interpreter(Parser& parser, DatastoreAccess& datastore) |
Václav Kubernát | 812ee28 | 2018-08-30 17:10:03 +0200 | [diff] [blame] | 304 | : m_parser(parser) |
| 305 | , m_datastore(datastore) |
Václav Kubernát | 96344a1 | 2018-05-28 16:33:39 +0200 | [diff] [blame] | 306 | { |
| 307 | } |