add null object and add load const

This commit is contained in:
2025-06-24 03:49:05 +01:00
parent 498cd39c04
commit 908d627962
8 changed files with 94 additions and 24 deletions

View File

@@ -4,6 +4,8 @@
#include <gmp.h>
#include <stdbool.h>
extern ArgonObject *BASE_OBJECT;
struct string_struct {
char *data;
size_t length;
@@ -21,6 +23,7 @@ typedef enum {
struct ArgonObject {
ArgonType type;
ArgonObject *baseObject;
ArgonObject *typeObject;
struct hashmap *fields; // dynamic fields/methods
union {
@@ -32,6 +35,7 @@ struct ArgonObject {
} value;
};
typedef struct ArgonObject ArgonObject;
void init_base_field();
ArgonObject *init_argon_object();