summaryrefslogtreecommitdiff
path: root/src/MemoryData.cpp
diff options
context:
space:
mode:
authorSyndamia <kamen@syndamia.com>2022-11-29 19:02:10 +0200
committerSyndamia <kamen@syndamia.com>2022-11-29 19:02:10 +0200
commit83c7854b3f6e60d6e3c430b9c3dd59b3773c4ef2 (patch)
tree08511019dfa78f49c9ecddde864186a7fa81cf5f /src/MemoryData.cpp
parent6f5fe499c2ba09057f3462edaeccfee5cc6f25a4 (diff)
downloadarzu-interpreter-83c7854b3f6e60d6e3c430b9c3dd59b3773c4ef2.tar
arzu-interpreter-83c7854b3f6e60d6e3c430b9c3dd59b3773c4ef2.tar.gz
arzu-interpreter-83c7854b3f6e60d6e3c430b9c3dd59b3773c4ef2.zip
Added a somewhat working version of the parser
Diffstat (limited to 'src/MemoryData.cpp')
-rw-r--r--src/MemoryData.cpp24
1 files changed, 24 insertions, 0 deletions
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 <cstring>
+
+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<string> argNames, int scopeStart, int scopeEnd) : argumentNames(argNames), scopeStart(scopeStart), scopeEnd(scopeEnd) {
+ this->type = TFunc;
+}