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.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/MemoryData.h (limited to 'src/MemoryData.h') 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 +#include +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 argumentNames; + int scopeStart; + int scopeEnd; + Function(list, int, int); +}; + +#endif -- cgit v1.2.3