2024-03-31 21:10:56 +00:00
|
|
|
#ifndef SK_MODULE_H
|
|
|
|
#define SK_MODULE_H
|
|
|
|
|
|
|
|
#include "commons.h"
|
|
|
|
#include "prog.h"
|
2024-04-02 15:33:31 +00:00
|
|
|
#include "sym.h"
|
2024-04-06 18:44:58 +00:00
|
|
|
#include "state.h"
|
2024-03-31 21:10:56 +00:00
|
|
|
|
|
|
|
struct module
|
|
|
|
{
|
2024-04-07 18:43:13 +00:00
|
|
|
char* name;
|
2024-03-31 21:10:56 +00:00
|
|
|
struct str source;
|
2024-04-07 18:43:13 +00:00
|
|
|
struct prog* prog;
|
|
|
|
struct sym* sym;
|
|
|
|
struct state* state;
|
2024-03-31 21:10:56 +00:00
|
|
|
};
|
|
|
|
|
2024-04-07 18:43:13 +00:00
|
|
|
void module_init(struct module* self, char const* name);
|
|
|
|
struct module* module_new_clone(struct module* self);
|
2024-03-31 21:10:56 +00:00
|
|
|
void module_free(struct module* self);
|
|
|
|
|
2024-04-07 18:43:13 +00:00
|
|
|
void module_load_source(struct module* self,
|
2024-03-31 21:10:56 +00:00
|
|
|
char const* path);
|
|
|
|
|
2024-04-01 05:20:42 +00:00
|
|
|
int module_compile(struct module* self);
|
2024-03-31 21:10:56 +00:00
|
|
|
|
|
|
|
#endif
|