This commit is contained in:
Andre Wagner
2026-04-29 15:50:27 -05:00
parent 03b61f4339
commit feb272e545
3 changed files with 55 additions and 5 deletions

View File

@@ -1,6 +1,7 @@
#ifndef TYCHE_STACK_HH
#define TYCHE_STACK_HH
#include <stack>
#include <vector>
#include "value.hh"
@@ -9,14 +10,20 @@ namespace tyche {
class Stack {
public:
Stack();
void push(Value const& value);
Value pop();
[[nodiscard]] Value at(int pos) const;
[[nodiscard]] size_t size() const;
void push_fp();
void pop_fp();
private:
std::vector<Value> stack_;
std::stack<size_t> fps_;
};
} // tyche