From 09e128ce98de793d22669255897e4b4816d0e53e Mon Sep 17 00:00:00 2001 From: _ov4 Date: Mon, 2 Feb 2026 09:02:39 +0000 Subject: Added logical operators --- include/cps/AST.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/cps/AST.h') 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 Operand; +public: + UnaryExprAST(int Op, std::unique_ptr 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 LHS, RHS; -- cgit v1.3.1-4-g156e