summaryrefslogtreecommitdiff
path: root/src/MemoryData.h
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.h
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.h')
-rw-r--r--src/MemoryData.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/MemoryData.h b/src/MemoryData.h
new file mode 100644
index 0000000..06f259a
--- /dev/null
+++ b/src/MemoryData.h
@@ -0,0 +1,46 @@
+#ifndef ARZU_INTERPRETER_MEMORY_DATA
+#define ARZU_INTERPRETER_MEMORY_DATA
+
+#include <list>
+#include <string>
+using namespace std;
+
+class MemoryData {
+public:
+ enum Type {
+ TNone,
+ TName,
+ TFunc,
+ TInt,
+ };
+
+protected:
+ Type type;
+
+public:
+
+ Type get_type() const;
+
+ MemoryData();
+ ~MemoryData() = default;
+};
+
+struct Name : public MemoryData {
+ string value;
+ Name();
+ Name(string&);
+};
+
+struct Int : public MemoryData {
+ int value;
+ Int(int);
+};
+
+struct Function : public MemoryData {
+ list<string> argumentNames;
+ int scopeStart;
+ int scopeEnd;
+ Function(list<string>, int, int);
+};
+
+#endif