From 4573880fcc32bd76a72a4ae713190cd997194583 Mon Sep 17 00:00:00 2001 From: ov-4 Date: Thu, 29 Jan 2026 13:02:49 +0000 Subject: Added loop statements, FOR, WHILE and REPEAT --- include/cps/CodeGen.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/cps/CodeGen.h') diff --git a/include/cps/CodeGen.h b/include/cps/CodeGen.h index 88e4755..9be6cc7 100644 --- a/include/cps/CodeGen.h +++ b/include/cps/CodeGen.h @@ -20,10 +20,14 @@ class CodeGen { llvm::FunctionCallee ScanfFunc; llvm::Value *PrintfFormatStr; llvm::Value *ScanfFormatStr; + llvm::Value *emitExpr(ExprAST *Expr); void emitStmt(StmtAST *Stmt); - void emitIfStmt(IfStmtAST *Stmt); + void emitIfStmt(IfStmtAST *Stmt); + void emitWhileStmt(WhileStmtAST *Stmt); + void emitRepeatStmt(RepeatStmtAST *Stmt); + void emitForStmt(ForStmtAST *Stmt); void SetupExternalFunctions(); -- cgit v1.3.1-4-g156e