forked from PuqiAR/Fig-TreeWalker
v0.3.1
This commit is contained in:
27
include/Ast/UnaryExpr.hpp
Normal file
27
include/Ast/UnaryExpr.hpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include <Ast/astBase.hpp>
|
||||
|
||||
namespace Fig::Ast
|
||||
{
|
||||
class UnaryExprAst final : public ExpressionAst
|
||||
{
|
||||
public:
|
||||
Operator op;
|
||||
Expression exp;
|
||||
|
||||
UnaryExprAst()
|
||||
{
|
||||
type = AstType::UnaryExpr;
|
||||
}
|
||||
UnaryExprAst(Operator _op, Expression _exp)
|
||||
{
|
||||
type = AstType::UnaryExpr;
|
||||
|
||||
op = _op;
|
||||
exp = std::move(_exp);
|
||||
}
|
||||
};
|
||||
|
||||
using UnaryExpr = std::shared_ptr<UnaryExprAst>;
|
||||
} // namespace Fig
|
||||
Reference in New Issue
Block a user