From 0b3eebbf3b8644f06b2ae9d512135870938fb1c3 Mon Sep 17 00:00:00 2001 From: Adrian Kummerländer Date: Sat, 19 Oct 2013 22:06:53 +0200 Subject: Merged Node factory-methods into template method Added ConstantNode blueprint --- src/nodes.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/nodes.cc') 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 @@ -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_; +} + } -- cgit v1.2.3