From b8d2ea4f75c21b46f37310e94d2409290b35469a Mon Sep 17 00:00:00 2001 From: Syndamia Date: Wed, 8 Feb 2023 00:20:02 +0200 Subject: [IPL/T] Moved Funcall out of it's folder --- .../Transpiler/src/LLVMVisitor/LLVMVisitor.h | 2 +- .../Transpiler/src/Value/Funcall.cpp | 16 ++++++++++++++++ .../Transpiler/src/Value/Funcall.h | 20 ++++++++++++++++++++ .../Transpiler/src/Value/Function/Funcall.cpp | 16 ---------------- .../Transpiler/src/Value/Function/Funcall.h | 20 -------------------- .../Transpiler/src/main.cpp | 1 - 6 files changed, 37 insertions(+), 38 deletions(-) create mode 100644 Year 2/Implementation of Programming Languages/Transpiler/src/Value/Funcall.cpp create mode 100644 Year 2/Implementation of Programming Languages/Transpiler/src/Value/Funcall.h delete mode 100644 Year 2/Implementation of Programming Languages/Transpiler/src/Value/Function/Funcall.cpp delete mode 100644 Year 2/Implementation of Programming Languages/Transpiler/src/Value/Function/Funcall.h diff --git a/Year 2/Implementation of Programming Languages/Transpiler/src/LLVMVisitor/LLVMVisitor.h b/Year 2/Implementation of Programming Languages/Transpiler/src/LLVMVisitor/LLVMVisitor.h index d473451..f3d00f1 100644 --- a/Year 2/Implementation of Programming Languages/Transpiler/src/LLVMVisitor/LLVMVisitor.h +++ b/Year 2/Implementation of Programming Languages/Transpiler/src/LLVMVisitor/LLVMVisitor.h @@ -13,7 +13,7 @@ #include "../Value/Float.h" #include "../Value/Name.h" #include "../Value/List.h" -#include "../Value/Function/Funcall.h" +#include "../Value/Funcall.h" class LLVMVisitor { std::ofstream outFile; diff --git a/Year 2/Implementation of Programming Languages/Transpiler/src/Value/Funcall.cpp b/Year 2/Implementation of Programming Languages/Transpiler/src/Value/Funcall.cpp new file mode 100644 index 0000000..47a19af --- /dev/null +++ b/Year 2/Implementation of Programming Languages/Transpiler/src/Value/Funcall.cpp @@ -0,0 +1,16 @@ +#include "Funcall.h" +#include "../LLVMVisitor/LLVMVisitor.h" + +const std::string& Funcall::get_funname() const { + return funName; +} + +const std::vector& Funcall::get_args() const { + return args; +} + +LLVMRet Funcall::Visit(LLVMVisitor& visitor) const { + return visitor.Visit(*this); +} + +Funcall::Funcall(std::string funName, std::vector args) : funName(funName), args(args) {} diff --git a/Year 2/Implementation of Programming Languages/Transpiler/src/Value/Funcall.h b/Year 2/Implementation of Programming Languages/Transpiler/src/Value/Funcall.h new file mode 100644 index 0000000..4b7b826 --- /dev/null +++ b/Year 2/Implementation of Programming Languages/Transpiler/src/Value/Funcall.h @@ -0,0 +1,20 @@ +#ifndef VALUE_FUNCALL +#define VALUE_FUNCALL + +#include +#include "Value.h" + +class Funcall : public Value { + std::string funName; + std::vector args; +public: + const std::string& get_funname() const; + const std::vector& get_args() const; + + LLVMRet Visit(LLVMVisitor& visitor) const override; + + Funcall(std::string funName, std::vector args); + ~Funcall() override = default; +}; + +#endif diff --git a/Year 2/Implementation of Programming Languages/Transpiler/src/Value/Function/Funcall.cpp b/Year 2/Implementation of Programming Languages/Transpiler/src/Value/Function/Funcall.cpp deleted file mode 100644 index df88001..0000000 --- a/Year 2/Implementation of Programming Languages/Transpiler/src/Value/Function/Funcall.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include "Funcall.h" -#include "../../LLVMVisitor/LLVMVisitor.h" - -const std::string& Funcall::get_funname() const { - return funName; -} - -const std::vector& Funcall::get_args() const { - return args; -} - -LLVMRet Funcall::Visit(LLVMVisitor& visitor) const { - return visitor.Visit(*this); -} - -Funcall::Funcall(std::string funName, std::vector args) : funName(funName), args(args) {} diff --git a/Year 2/Implementation of Programming Languages/Transpiler/src/Value/Function/Funcall.h b/Year 2/Implementation of Programming Languages/Transpiler/src/Value/Function/Funcall.h deleted file mode 100644 index 30dda60..0000000 --- a/Year 2/Implementation of Programming Languages/Transpiler/src/Value/Function/Funcall.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef VALUE_FUNCALL -#define VALUE_FUNCALL - -#include -#include "../Value.h" - -class Funcall : public Value { - std::string funName; - std::vector args; -public: - const std::string& get_funname() const; - const std::vector& get_args() const; - - LLVMRet Visit(LLVMVisitor& visitor) const override; - - Funcall(std::string funName, std::vector args); - ~Funcall() override = default; -}; - -#endif 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 4c66e70..cc5d771 100644 --- a/Year 2/Implementation of Programming Languages/Transpiler/src/main.cpp +++ b/Year 2/Implementation of Programming Languages/Transpiler/src/main.cpp @@ -1,7 +1,6 @@ #include #include #include "LLVMVisitor/LLVMVisitor.h" -#include "Value/Function/Funcall.h" int main() { LLVMVisitor visitor("testout.ll"); -- cgit v1.3.1-26-gb76a