From 1ba5c17a68f13633d6a20785c722b22032ba45c4 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Wed, 31 Aug 2016 19:50:57 +0000 Subject: Add runtime and value classes --- value.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 value.h (limited to 'value.h') diff --git a/value.h b/value.h new file mode 100644 index 0000000..71d5101 --- /dev/null +++ b/value.h @@ -0,0 +1,21 @@ +#pragma once +#include + +class Value { + public: + enum Type { + Integer, + String + }; + + Value(std::string& lexeme); + const Value::Type getType() const; + const int getIntData() const; + const std::string& getStrData() const; + + private: + int m_intData; + std::string m_strData; + + Value::Type m_type; +}; -- cgit v1.3