From cc30a97ab90a8fa40707936d3d089d81c49559b6 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 23 Jan 2020 03:09:54 +0100 Subject: Add bytecode decoding.. starting on program execution now --- include/program.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 include/program.h (limited to 'include/program.h') diff --git a/include/program.h b/include/program.h new file mode 100644 index 0000000..6135726 --- /dev/null +++ b/include/program.h @@ -0,0 +1,22 @@ +#ifndef TSL_PROGRAM_H +#define TSL_PROGRAM_H + +#include "std/buffer.h" +#include "std/hash_map.h" + +typedef struct { + TslBuffer /*TslBytecode*/ function_bytecode_list; + TslHashMap variables; +} TslProgram; + +typedef enum { + TSL_PROGRAM_RESULT_ERR, + TSL_PROGRAM_RESULT_OK +} TslProgramResult; + +void tsl_program_init(TslProgram *self); +void tsl_program_deinit(TslProgram *self); + +TslProgramResult tsl_program_run(TslProgram *self); + +#endif /* TSL_PROGRAM_H */ -- cgit v1.2.3