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, 8 insertions, 4 deletions
diff --git a/src/tree.h b/src/tree.h
index 68a31c1..0db1404 100644
--- a/src/tree.h
+++ b/src/tree.h
@@ -1,17 +1,20 @@
#ifndef PARSER_SRC_NODE_H_
#define PARSER_SRC_NODE_H_
-#include <vector>
-#include <string>
#include <memory>
+#include <string>
+#include <vector>
#include "nodes.h"
namespace SimpleParser {
+typedef std::vector<std::unique_ptr<Node>> NodeCollection;
+
class Tree {
public:
Tree(std::string);
+ Tree(std::string, const ConstantMap*);
double solve();
std::string print();
@@ -21,9 +24,10 @@ class Tree {
Node* addNode(Node**, Args&&... args);
Node* buildTree(std::string);
- std::vector<std::unique_ptr<Node>> node_collection_;
- Node* root_node_;
std::string term_;
+ Node* root_node_;
+ NodeCollection node_collection_;
+ const ConstantMap* constants_;
};
}