diff options
author | Adrian Kummerländer | 2013-10-19 22:06:53 +0200 |
---|---|---|
committer | Adrian Kummerländer | 2013-10-19 22:06:53 +0200 |
commit | 0b3eebbf3b8644f06b2ae9d512135870938fb1c3 (patch) | |
tree | de0792d97b52328b3651acddd86293d32be54936 /src/tree.h | |
parent | 69ce370c9ebf92caea64ef1ba28a502affdad3d5 (diff) | |
download | SimpleParser-0b3eebbf3b8644f06b2ae9d512135870938fb1c3.tar SimpleParser-0b3eebbf3b8644f06b2ae9d512135870938fb1c3.tar.gz SimpleParser-0b3eebbf3b8644f06b2ae9d512135870938fb1c3.tar.bz2 SimpleParser-0b3eebbf3b8644f06b2ae9d512135870938fb1c3.tar.lz SimpleParser-0b3eebbf3b8644f06b2ae9d512135870938fb1c3.tar.xz SimpleParser-0b3eebbf3b8644f06b2ae9d512135870938fb1c3.tar.zst SimpleParser-0b3eebbf3b8644f06b2ae9d512135870938fb1c3.zip |
Merged Node factory-methods into template method
Added ConstantNode blueprint
Diffstat (limited to 'src/tree.h')
-rw-r--r-- | src/tree.h | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -17,9 +17,8 @@ class Tree { std::string print(); private: - Node* addOperand(Node**, double); - Node* addOperand(Node**, std::string); - Node* addOperator(Node**, TokenType); + template <class NType, typename... Args> + Node* addNode(Node**, Args&&... args); Node* buildTree(std::string); std::vector<std::unique_ptr<Node>> node_collection_; |