aboutsummaryrefslogtreecommitdiffstats
path: root/value.h
diff options
context:
space:
mode:
authorJan Tuomi <jans.tuomi@gmail.com>2016-08-31 19:50:57 +0000
committerJan Tuomi <jans.tuomi@gmail.com>2016-08-31 19:50:57 +0000
commit1ba5c17a68f13633d6a20785c722b22032ba45c4 (patch)
tree40b3aac27fe9af4c9d82965d714acde0b5508435 /value.h
parentb7eeb6676b8f67be7cc1560d9586f2672a5ad0eb (diff)
Add runtime and value classes
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;
+};