start creating base objects for runtime

This commit is contained in:
2025-06-24 01:55:01 +01:00
parent 74c71c3a1b
commit 498cd39c04
16 changed files with 414 additions and 153 deletions

View File

@@ -0,0 +1,16 @@
#include "../object.h"
#include <stdint.h>
ArgonObject *ARGON_STRING_TYPE = NULL;
void init_string_type() {
ARGON_STRING_TYPE = init_argon_object();
}
ArgonObject *init_string_object(char*data, size_t length) {
ArgonObject * object = init_argon_object();
object->typeObject = ARGON_STRING_TYPE;
object->value.as_str.data = data;
object->value.as_str.length = length;
return object;
}