diff options
| author | _ov4 <hausemasterstream@gmail.com> | 2026-02-02 09:02:39 +0000 |
|---|---|---|
| committer | _ov4 <hausemasterstream@gmail.com> | 2026-02-02 09:02:39 +0000 |
| commit | 09e128ce98de793d22669255897e4b4816d0e53e (patch) | |
| tree | 7afcbeb1e245641b60cfa68dcf0915e019975d24 /include/cps/AST.h | |
| parent | 419420770c4545ea4010047ef2153004d4700eed (diff) | |
Added logical operators
Diffstat (limited to 'include/cps/AST.h')
| -rw-r--r-- | include/cps/AST.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/cps/AST.h b/include/cps/AST.h index 588f5eb..de57024 100644 --- a/include/cps/AST.h +++ b/include/cps/AST.h @@ -51,6 +51,16 @@ public: int getLine() const { return Line; } }; +class UnaryExprAST : public ExprAST { + int Op; + std::unique_ptr<ExprAST> Operand; +public: + UnaryExprAST(int Op, std::unique_ptr<ExprAST> Operand) + : Op(Op), Operand(std::move(Operand)) {} + int getOp() const { return Op; } + ExprAST *getOperand() const { return Operand.get(); } +}; + class BinaryExprAST : public ExprAST { int Op; std::unique_ptr<ExprAST> LHS, RHS; |
