From 83c7854b3f6e60d6e3c430b9c3dd59b3773c4ef2 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Tue, 29 Nov 2022 19:02:10 +0200 Subject: Added a somewhat working version of the parser --- src/MemoryData.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/MemoryData.cpp (limited to 'src/MemoryData.cpp') diff --git a/src/MemoryData.cpp b/src/MemoryData.cpp new file mode 100644 index 0000000..34e2877 --- /dev/null +++ b/src/MemoryData.cpp @@ -0,0 +1,24 @@ +#include "MemoryData.h" +#include + +MemoryData::Type MemoryData::get_type() const { + return this->type; +} + +MemoryData::MemoryData() : type(TNone) {} + +Name::Name() : value() { + this->type = TName; +} + +Name::Name(string& str) : value(str) { + this->type = TName; +} + +Int::Int(int num) : value(num) { + this->type = TInt; +} + +Function::Function(list argNames, int scopeStart, int scopeEnd) : argumentNames(argNames), scopeStart(scopeStart), scopeEnd(scopeEnd) { + this->type = TFunc; +} -- cgit v1.2.3