diff options
| author | Syndamia <kamen@syndamia.com> | 2022-11-29 19:02:10 +0200 |
|---|---|---|
| committer | Syndamia <kamen@syndamia.com> | 2022-11-29 19:02:10 +0200 |
| commit | 83c7854b3f6e60d6e3c430b9c3dd59b3773c4ef2 (patch) | |
| tree | 08511019dfa78f49c9ecddde864186a7fa81cf5f /src/MemoryData.h | |
| parent | 6f5fe499c2ba09057f3462edaeccfee5cc6f25a4 (diff) | |
| download | arzu-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.h | 46 |
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 |
