diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2021-12-30 18:31:53 +0100 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2021-12-30 18:31:53 +0100 |
commit | ec14f2955222932bb68704cc4590ba1dbd165cd9 (patch) | |
tree | 7bc4e580170231af32305f65875bd3cb2d9d541c /api/vm.h | |
parent | 4c52777ca9e52edd0bff76168d886de9757ea457 (diff) | |
download | uwu-lang-ec14f2955222932bb68704cc4590ba1dbd165cd9.tar.xz |
Allow passing arguments to program, refactor directory structure
Diffstat (limited to 'api/vm.h')
-rw-r--r-- | api/vm.h | 23 |
1 files changed, 11 insertions, 12 deletions
@@ -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); |