This commit is contained in:
2026-04-27 13:28:03 -05:00
parent 7bcf3b181b
commit 84fca2a615
5 changed files with 39 additions and 17 deletions

View File

@@ -0,0 +1,29 @@
#ifndef TYCHE_BYTECODEPROTOTYPE_HH
#define TYCHE_BYTECODEPROTOTYPE_HH
#include <cstdint>
#include <string>
#include <variant>
#include <vector>
namespace tyche {
struct BytecodePrototype {
using ConstantValue = std::variant<int32_t, float, std::string>;
using Value = std::variant<int32_t, float>;
struct Function {
uint16_t n_pars = 0;
uint16_t n_locals = 0;
ByteArray code {};
};
std::vector<ConstantValue> constants {};
std::vector<Function> functions {};
// TODO - debugging info
};
}
#endif //TYCHE_BYTECODEPROTOTYPE_HH