aboutsummaryrefslogtreecommitdiff
path: root/src/nodes.cc
diff options
context:
space:
mode:
authorAdrian Kummerländer2013-10-19 22:06:53 +0200
committerAdrian Kummerländer2013-10-19 22:06:53 +0200
commit0b3eebbf3b8644f06b2ae9d512135870938fb1c3 (patch)
treede0792d97b52328b3651acddd86293d32be54936 /src/nodes.cc
parent69ce370c9ebf92caea64ef1ba28a502affdad3d5 (diff)
downloadSimpleParser-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/nodes.cc')
-rw-r--r--src/nodes.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nodes.cc b/src/nodes.cc
index bab7ff7..1ab1502 100644
--- a/src/nodes.cc
+++ b/src/nodes.cc
@@ -1,4 +1,5 @@
#include "nodes.h"
+#include "utils.h"
#include "exceptions.h"
#include <cmath>
@@ -93,4 +94,19 @@ TokenType OperatorNode::getToken() {
return this->operator_;
}
+ConstantNode::ConstantNode(std::string identifier):
+ identifier_(identifier) { }
+
+double ConstantNode::solve() {
+
+}
+
+NodeType ConstantNode::getType() {
+ return NodeType::CONSTANT;
+}
+
+std::string ConstantNode::print() {
+ return this->identifier_;
+}
+
}