start adding error message support
This commit is contained in:
@@ -2,25 +2,13 @@
|
||||
#define RUNTIME_H
|
||||
#include "../translator/translator.h"
|
||||
#include "internals/hashmap/hashmap.h"
|
||||
#include "../returnTypes.h"
|
||||
|
||||
typedef struct {
|
||||
ArgonObject **registers;
|
||||
size_t head;
|
||||
} RuntimeState;
|
||||
|
||||
typedef struct {
|
||||
bool exists;
|
||||
char *path;
|
||||
int64_t line;
|
||||
char *type;
|
||||
char *message;
|
||||
} ArErr;
|
||||
|
||||
typedef struct Stack {
|
||||
ArgonObject *scope;
|
||||
struct Stack *prev;
|
||||
} Stack;
|
||||
|
||||
void init_types();
|
||||
|
||||
uint64_t pop_bytecode(Translated *translated, RuntimeState *state);
|
||||
@@ -30,6 +18,8 @@ ArErr run_instruction(Translated *translated, RuntimeState *state,
|
||||
|
||||
RuntimeState init_runtime_state(Translated translated);
|
||||
|
||||
ArgonObject *runtime(Translated translated, RuntimeState state);
|
||||
Stack create_scope(Stack *prev);
|
||||
|
||||
ArErr runtime(Translated translated, RuntimeState state, Stack stack);
|
||||
|
||||
#endif // RUNTIME_H
|
||||
Reference in New Issue
Block a user