aboutsummaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
Diffstat (limited to 'api')
-rw-r--r--api/int.c2
-rw-r--r--api/ref.c2
-rw-r--r--api/util.c2
-rw-r--r--api/vm.c2
-rw-r--r--api/vm.h23
5 files changed, 15 insertions, 16 deletions
diff --git a/api/int.c b/api/int.c
index 8446d1d..b1e0c69 100644
--- a/api/int.c
+++ b/api/int.c
@@ -1,5 +1,5 @@
#include <stdlib.h>
-#include "../src/util.h"
+#include "common/str.h"
#include "int.h"
UwUVMValue uwuint_create(int value)
diff --git a/api/ref.c b/api/ref.c
index 43eb68e..517869e 100644
--- a/api/ref.c
+++ b/api/ref.c
@@ -1,4 +1,4 @@
-#include "../src/util.h"
+#include "common/str.h"
#include "ref.h"
UwUVMValue uwuref_create(UwUVMFunction *value)
diff --git a/api/util.c b/api/util.c
index c3e8a38..e6f0650 100644
--- a/api/util.c
+++ b/api/util.c
@@ -1,4 +1,4 @@
-#include "../src/err.h"
+#include "common/err.h"
#include "util.h"
#include "bool.h"
diff --git a/api/vm.c b/api/vm.c
index 5cab6c0..8374050 100644
--- a/api/vm.c
+++ b/api/vm.c
@@ -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"
diff --git a/api/vm.h b/api/vm.h
index 81465f8..fc761d3 100644
--- a/api/vm.h
+++ b/api/vm.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);