aboutsummaryrefslogtreecommitdiff
path: root/include/program.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/program.h')
-rw-r--r--include/program.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/program.h b/include/program.h
new file mode 100644
index 0000000..cbd9432
--- /dev/null
+++ b/include/program.h
@@ -0,0 +1,18 @@
+#ifndef AMAL_PROGRAM_H
+#define AMAL_PROGRAM_H
+
+#include "std/buffer.h"
+#include "bytecode/bytecode.h"
+
+typedef struct {
+ Buffer/*<...>*/ data;
+} amal_program;
+
+void amal_program_init(amal_program *self);
+void amal_program_deinit(amal_program *self);
+
+CHECK_RESULT int amal_program_append_bytecode(amal_program *self, Bytecode *bytecode);
+CHECK_RESULT int amal_program_run(amal_program *self);
+CHECK_RESULT int amal_program_save(amal_program *self, const char *filepath);
+
+#endif