Initial commit

This commit is contained in:
2026-06-13 19:45:36 +10:00
commit 284b08b12a
56 changed files with 1546 additions and 0 deletions

24
src/New/Arg/FunctionRef.c Normal file
View File

@@ -0,0 +1,24 @@
#include "../../../include/ground.h"
#include <string.h>
#include <stdlib.h>
GroundArg _GroundNewArgFunctionRef(const char* ref) {
size_t len = strlen(ref);
char* copy = malloc(len + 1);
if (copy == NULL) {
Ground.Flags.error = true;
return (GroundArg) {
.type = GroundArg_DirectRef,
.as.ref = ""
};
}
strcpy(copy, ref);
return (GroundArg) {
.type = GroundArg_FunctionRef,
.as.ref = copy
};
}