#ifndef PARSER_SRC_NODE_H_ #define PARSER_SRC_NODE_H_ #include #include #include #include "nodes.h" namespace SimpleParser { class Tree { public: Tree(const std::string&, const ConstantMap*); explicit Tree(const std::string&); double solve() const; std::string print() const; private: template Node* addNode(Node**, Args&&... args); Node* buildTree(std::string); const std::string term_; const ConstantMap* constants_; std::vector> node_collection_; Node* const root_node_; }; } #endif // PARSER_SRC_NODE_H_