Added UnaryOpNode class
This commit is contained in:
parent
3289ae0148
commit
072e58b276
10
src/AST/UnaryOpNode.cpp
Normal file
10
src/AST/UnaryOpNode.cpp
Normal 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
12
src/AST/UnaryOpNode.h
Normal 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();
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user