aboutsummaryrefslogtreecommitdiff
path: root/include/cps/ArithmeticHandler.h
diff options
context:
space:
mode:
author_ov4 <hausemasterstream@gmail.com>2026-02-02 08:45:01 +0000
committer_ov4 <hausemasterstream@gmail.com>2026-02-02 08:45:01 +0000
commit419420770c4545ea4010047ef2153004d4700eed (patch)
treebd19eed681dbb68ecb501b6cfc220c42a9803ef3 /include/cps/ArithmeticHandler.h
parentecc0fc463ba54dd0cbe33bc14415f432eaa959de (diff)
Added REAL and BOOLEAN types, DIV and MOD operators
Diffstat (limited to 'include/cps/ArithmeticHandler.h')
-rw-r--r--include/cps/ArithmeticHandler.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/cps/ArithmeticHandler.h b/include/cps/ArithmeticHandler.h
new file mode 100644
index 0000000..8d6ea27
--- /dev/null
+++ b/include/cps/ArithmeticHandler.h
@@ -0,0 +1,19 @@
+#pragma once
+#include "llvm/IR/IRBuilder.h"
+#include "llvm/IR/LLVMContext.h"
+#include "cps/Lexer.h"
+
+namespace cps {
+
+class ArithmeticHandler {
+ llvm::LLVMContext &Context;
+ llvm::IRBuilder<> &Builder;
+
+public:
+ ArithmeticHandler(llvm::LLVMContext &Ctx, llvm::IRBuilder<> &B)
+ : Context(Ctx), Builder(B) {}
+
+ llvm::Value *emitBinaryOp(int Op, llvm::Value *LHS, llvm::Value *RHS, int Line);
+};
+
+}