aboutsummaryrefslogtreecommitdiffstats
path: root/src/runtime.h
diff options
context:
space:
mode:
authorjantuomi <jans.tuomi@gmail.com>2016-09-01 13:47:24 +0300
committerjantuomi <jans.tuomi@gmail.com>2016-09-01 13:47:24 +0300
commit53e30cdd779f12ba5b19a59e9e18abf69c795ad5 (patch)
tree4c479058450591e6dc7f79bd1fdeaab1b2d2d99e /src/runtime.h
parent41f1e410b7cc48db4ec0b99d9d2b49d2edb2a315 (diff)
Add sum function
Diffstat (limited to 'src/runtime.h')
-rw-r--r--src/runtime.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/runtime.h b/src/runtime.h
index af8351f..16c1c28 100644
--- a/src/runtime.h
+++ b/src/runtime.h
@@ -5,11 +5,14 @@
class Runtime {
private:
- std::stack<int> m_values;
- bool runCommand(const Token& token);
+ std::vector<int> m_values;
+ void runCommand(const Token& token);
+
+ void doSum();
public:
Runtime();
void initValues(const std::vector<int>& values);
void run(std::vector<Token>& tokens);
+ void printValues() const;
};