Summary Files Commits Branches @commit @diff @stats
path: root / Year 2 / Implementation of Programming Languages / Transpiler / src / main.cpp
diff options
context:
space:
mode:
Commitc42d553c7df6ae7073488cb971ea984932a86801 (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-01-19 13:55:46 +0200
Committer
 Syndamia <kamen@syndamia.com>
2023-01-19 13:55:46 +0200
Files455f05ed4b0f375fa81011e64f603889b315f3e0 /Year 2/Implementation of Programming Languages/Transpiler/src/main.cpp
uni-projects-c42d553c7df6ae7073488cb971ea984932a86801.tar
uni-projects-c42d553c7df6ae7073488cb971ea984932a86801.tar.gz
uni-projects-c42d553c7df6ae7073488cb971ea984932a86801.zip
Parentbfa6fffc85772c17219437ab99c0cc59c3056f88 (diff)
[IPL/T] Moved function associativity to a seperate function
1 files changed, 5 insertions, 1 deletions
-rw-r--r--Year 2/Implementation of Programming Languages/Transpiler/src/main.cpp6
diff --git a/Year 2/Implementation of Programming Languages/Transpiler/src/main.cpp b/Year 2/Implementation of Programming Languages/Transpiler/src/main.cpp
index fefe544..a154c56 100644
--- a/Year 2/Implementation of Programming Languages/Transpiler/src/main.cpp
+++ b/Year 2/Implementation of Programming Languages/Transpiler/src/main.cpp
@@ -1,12 +1,16 @@
#include <iostream>
#include <deque>
#include "LLVMVisitor/LLVMVisitor.h"
+#include "Value/Function/BuiltInFunction.h"
int main() {
LLVMVisitor visitor("testout.ll");
std::deque<Value*> nodes = {
new BuiltInFunction("+", {
- new Integer(1), new Integer(2), new Integer(123) }) };
+ new Integer(1),
+ new Integer(2),
+ new BuiltInFunction("-", { new Integer(5), new Integer(10) }),
+ new Integer(123) }) };
for (Value* n : nodes) {
n->Visit(visitor);
}