diff options
Diffstat (limited to 'private_include/interp.h')
| -rw-r--r-- | private_include/interp.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/private_include/interp.h b/private_include/interp.h new file mode 100644 index 0000000..beafbb1 --- /dev/null +++ b/private_include/interp.h @@ -0,0 +1,29 @@ +#ifndef INTERP_H +#define INTERP_H + +#include <opcodes.h> +#include <stddef.h> +#include <stdint.h> +#include <stdio.h> + +struct interp_cfg +{ + FILE *f; +}; + +struct interp_set +{ + const enum opcode *opcodes; + size_t n; +}; + +extern const struct interp_set interp_initexpr_set; + +struct interp *interp_alloc(const struct interp_cfg *cfg); +int interp_run(struct interp *i); +int interp_run_limited(struct interp *i, const struct interp_set *ops); +const char *interp_get_exception(const struct interp *i); +void interp_free(struct interp *i); +int interp_check_opcode(uint8_t op, FILE *f); + +#endif |
