This commit is contained in:
Andre Wagner
2026-04-29 15:36:22 -05:00
parent 30bfb38e9a
commit 03b61f4339
5 changed files with 110 additions and 0 deletions

24
src/vm/stack.hh Normal file
View File

@@ -0,0 +1,24 @@
#ifndef TYCHE_STACK_HH
#define TYCHE_STACK_HH
#include <vector>
#include "value.hh"
namespace tyche {
class Stack {
public:
void push(Value const& value);
Value pop();
[[nodiscard]] Value at(int pos) const;
[[nodiscard]] size_t size() const;
private:
std::vector<Value> stack_;
};
} // tyche
#endif //TYCHE_STACK_HH