diff options
Diffstat (limited to 'src/tree.h')
-rw-r--r-- | src/tree.h | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -11,17 +11,19 @@ namespace SimpleParser { class Tree { public: - void setRoot(Node*); + Tree(std::string); + double solve(); + std::string print(); + private: Node* addOperand(Node**, double); Node* addOperator(Node**, char); + Node* buildTree(std::string); - std::string print(std::string); - - private: - Node* root_node_; std::vector<std::unique_ptr<Node>> node_collection_; + Node* root_node_; + std::string term_; }; } |