aboutsummaryrefslogtreecommitdiff
path: root/src/tree.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tree.h')
-rw-r--r--src/tree.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/tree.h b/src/tree.h
index da611c7..5beec87 100644
--- a/src/tree.h
+++ b/src/tree.h
@@ -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_;
};
}