#ifndef TSL_PROGRAM_H #define TSL_PROGRAM_H #include "std/buffer.h" #include "std/hash_map.h" #include "value.h" #define TSL_STACK_MAX_SIZE 255 typedef struct { TslBuffer /*TslBytecode*/ function_bytecode_list; TslHashMap /*TslStringView, TslValue*/ variables; TslValue stack_values[TSL_STACK_MAX_SIZE]; size_t stack_index; } 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 */