From 072e58b276540e17ab23756ed650649b76799118 Mon Sep 17 00:00:00 2001 From: apio Date: Wed, 3 Aug 2022 15:26:48 +0000 Subject: [PATCH] Added UnaryOpNode class --- src/AST/UnaryOpNode.cpp | 10 ++++++++++ src/AST/UnaryOpNode.h | 12 ++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 src/AST/UnaryOpNode.cpp create mode 100644 src/AST/UnaryOpNode.h diff --git a/src/AST/UnaryOpNode.cpp b/src/AST/UnaryOpNode.cpp new file mode 100644 index 0000000..15f3e0c --- /dev/null +++ b/src/AST/UnaryOpNode.cpp @@ -0,0 +1,10 @@ +#include "UnaryOpNode.h" + +UnaryOpNode::UnaryOpNode(std::shared_ptr operand) + : operand(operand), ExprNode() +{ +} + +UnaryOpNode::~UnaryOpNode() +{ +} \ No newline at end of file diff --git a/src/AST/UnaryOpNode.h b/src/AST/UnaryOpNode.h new file mode 100644 index 0000000..75500f0 --- /dev/null +++ b/src/AST/UnaryOpNode.h @@ -0,0 +1,12 @@ +#pragma once +#include "ExprNode.h" + +class UnaryOpNode : public ExprNode +{ + protected: + std::shared_ptr operand; + + public: + UnaryOpNode(std::shared_ptr operand); + ~UnaryOpNode(); +}; \ No newline at end of file