Added UnaryOpNode class

This commit is contained in:
apio 2022-08-03 15:26:48 +00:00
parent 3289ae0148
commit 072e58b276
2 changed files with 22 additions and 0 deletions

10
src/AST/UnaryOpNode.cpp Normal file
View File

@ -0,0 +1,10 @@
#include "UnaryOpNode.h"
UnaryOpNode::UnaryOpNode(std::shared_ptr<ExprNode> operand)
: operand(operand), ExprNode()
{
}
UnaryOpNode::~UnaryOpNode()
{
}

12
src/AST/UnaryOpNode.h Normal file
View File

@ -0,0 +1,12 @@
#pragma once
#include "ExprNode.h"
class UnaryOpNode : public ExprNode
{
protected:
std::shared_ptr<ExprNode> operand;
public:
UnaryOpNode(std::shared_ptr<ExprNode> operand);
~UnaryOpNode();
};