diff options
[IPL/T] Implemented Float type and added basic function structure as well as added addition function for two arguments
1 files changed, 12 insertions, 0 deletions
| -rw-r--r-- | Year 2/Implementation of Programming Languages/Transpiler/src/Value/Float.cpp | 12 |
diff --git a/Year 2/Implementation of Programming Languages/Transpiler/src/Value/Float.cpp b/Year 2/Implementation of Programming Languages/Transpiler/src/Value/Float.cpp new file mode 100644 index 0000000..a286fa2 --- /dev/null +++ b/Year 2/Implementation of Programming Languages/Transpiler/src/Value/Float.cpp @@ -0,0 +1,12 @@ +#include "Float.h" +#include "../LLVMVisitor/LLVMVisitor.h" + +std::string Float::Visit(LLVMVisitor& visitor) const { + return visitor.Visit(*this); +} + +const double& Float::get_value() const { + return this->value; +} + +Float::Float(double value) : value(value) {} |
