aboutsummaryrefslogtreecommitdiffstats
path: root/value.h
diff options
context:
space:
mode:
Diffstat (limited to 'value.h')
-rw-r--r--value.h21
1 files changed, 21 insertions, 0 deletions
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 <string>
+
+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;
+};