diff options
| author | jantuomi <jans.tuomi@gmail.com> | 2016-09-01 11:14:10 +0300 |
|---|---|---|
| committer | jantuomi <jans.tuomi@gmail.com> | 2016-09-01 11:14:10 +0300 |
| commit | be011366f249b8ebed3905030ce3b7021597ee34 (patch) | |
| tree | 3b357df175ba1f484d852d73d4cbf3da9c1910df /value.cpp | |
| parent | d6b44fb2323b4f6f5e0bd3de33a40d6fd8283c1a (diff) | |
Add value parsing from stdin, remove value class
Diffstat (limited to 'value.cpp')
| -rw-r--r-- | value.cpp | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/value.cpp b/value.cpp deleted file mode 100644 index a0f0acc..0000000 --- a/value.cpp +++ /dev/null @@ -1,25 +0,0 @@ -#include "value.h" -#include <string> - -Value::Value(Token& token) { - if (!token.isString()) { - m_type = Value::Type::Integer; - m_intData = std::stoi(token.getLexeme(), nullptr, 10); - } else { - m_type = Value::Type::String; - m_strData = token.getLexeme(); - } -} - - -const Value::Type Value::getType() const { - return m_type; -} - -const int Value::getIntData() const { - return m_intData; -} - -const std::string& Value::getStrData() const { - return m_strData; -} |
