diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-01-23 03:09:54 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-01-23 03:09:54 +0100 |
commit | cc30a97ab90a8fa40707936d3d089d81c49559b6 (patch) | |
tree | c6544b785395cf12b8c9f4c65c3f8ebb9699232d /include/program.h | |
parent | b7f056a73ad4053eb2284c54873dfb3888dcb430 (diff) |
Add bytecode decoding.. starting on program execution now
Diffstat (limited to 'include/program.h')
-rw-r--r-- | include/program.h | 22 |
1 files changed, 22 insertions, 0 deletions
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 */ |