diff options
Diffstat (limited to 'api')
-rw-r--r-- | api/int.c | 2 | ||||
-rw-r--r-- | api/ref.c | 2 | ||||
-rw-r--r-- | api/util.c | 2 | ||||
-rw-r--r-- | api/vm.c | 2 | ||||
-rw-r--r-- | api/vm.h | 23 |
5 files changed, 15 insertions, 16 deletions
@@ -1,5 +1,5 @@ #include <stdlib.h> -#include "../src/util.h" +#include "common/str.h" #include "int.h" UwUVMValue uwuint_create(int value) @@ -1,4 +1,4 @@ -#include "../src/util.h" +#include "common/str.h" #include "ref.h" UwUVMValue uwuref_create(UwUVMFunction *value) @@ -1,4 +1,4 @@ -#include "../src/err.h" +#include "common/err.h" #include "util.h" #include "bool.h" @@ -1,6 +1,6 @@ #include <stdio.h> #include <stdlib.h> -#include "../src/err.h" +#include "common/err.h" #include "vm.h" #include "str.h" #include "ref.h" @@ -3,7 +3,6 @@ #include <stddef.h> #include <stdbool.h> -#include "../src/expression.h" typedef enum { @@ -11,6 +10,16 @@ typedef enum MODULE_NATIVE, } UwUVMModuleType; +typedef enum +{ + EX_UNINIT, + EX_INTLIT, + EX_STRLIT, + EX_ARGNUM, + EX_FNNAME, + EX_FNCALL, +} UwUVMExpressionType; + typedef struct { void *(*clone)(void *data); @@ -46,7 +55,7 @@ typedef struct typedef struct UwUVMExpression { - ExpressionType type; + UwUVMExpressionType type; union { struct @@ -61,16 +70,6 @@ typedef struct UwUVMExpression } value; } UwUVMExpression; -typedef struct -{ - void *api_library; - UwUVMFunction *main_function; - UwUVMFunction **functions; - size_t num_functions; - void **libraries; - size_t num_libraries; -} UwUVMProgram; - UwUVMValue uwuvm_clone_value(UwUVMValue value); void uwuvm_delet_value(UwUVMValue value); char *uwuvm_print_value(UwUVMValue value); |