Summary Files Commits Branches @commit @diff @stats
path: root / Year 2 / Implementation of Programming Languages / Transpiler / src / main.cpp
diff options
context:
space:
mode:
Commitbfa6fffc85772c17219437ab99c0cc59c3056f88 (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-01-19 11:57:59 +0200
Committer
 Syndamia <kamen@syndamia.com>
2023-01-19 11:57:59 +0200
Files56fbf910a0507e3f42a71657144bbf0a0636a6ca /Year 2/Implementation of Programming Languages/Transpiler/src/main.cpp
uni-projects-bfa6fffc85772c17219437ab99c0cc59c3056f88.tar
uni-projects-bfa6fffc85772c17219437ab99c0cc59c3056f88.tar.gz
uni-projects-bfa6fffc85772c17219437ab99c0cc59c3056f88.zip
Parentfd77c95a1042b319ec6dc0fcc10d77d0fe8af170 (diff)
[IPL/T] Add function can handle multiple arguments
1 files changed, 3 insertions, 1 deletions
-rw-r--r--Year 2/Implementation of Programming Languages/Transpiler/src/main.cpp4
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 088f4d0..fefe544 100644
--- a/Year 2/Implementation of Programming Languages/Transpiler/src/main.cpp
+++ b/Year 2/Implementation of Programming Languages/Transpiler/src/main.cpp
@@ -4,7 +4,9 @@
int main() {
LLVMVisitor visitor("testout.ll");
- std::deque<Value*> nodes = { new BuiltInFunction("+", { new Integer(123), new Integer(567) }) };
+ std::deque<Value*> nodes = {
+ new BuiltInFunction("+", {
+ new Integer(1), new Integer(2), new Integer(123) }) };
for (Value* n : nodes) {
n->Visit(visitor);
}