VM basics (#5)
Co-authored-by: Andre Wagner <WagnerAndre@JohnDeere.com> Reviewed-on: https://192.168.5.48/andre/tyche/pulls/5
This commit was merged in pull request #5.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
#include "value.hh"
|
||||
|
||||
namespace tyche {
|
||||
namespace tyche::vm {
|
||||
|
||||
class Stack {
|
||||
public:
|
||||
@@ -21,6 +21,10 @@ public:
|
||||
void push_fp();
|
||||
void pop_fp();
|
||||
|
||||
[[nodiscard]] size_t fp_level() const { return fps_.size(); }
|
||||
|
||||
[[nodiscard]] std::string debug() const;
|
||||
|
||||
private:
|
||||
std::vector<Value> stack_;
|
||||
std::stack<size_t> fps_;
|
||||
|
||||
Reference in New Issue
Block a user