Library support in interpreter (docs soon)

This commit is contained in:
2026-01-02 20:29:27 +11:00
parent e7d735785c
commit 04b64e10d1
2 changed files with 177 additions and 13 deletions

View File

@@ -25,6 +25,7 @@ typedef enum ListAccessStatus {
struct GroundValue;
struct GroundFunction;
struct GroundScope;
struct List;
@@ -110,6 +111,11 @@ typedef struct GroundFunctionArgs {
char* name;
} GroundFunctionArgs;
/*
* Native function pointer type.
*/
typedef GroundValue (*NativeGroundFunction)(struct GroundScope* scope, List args);
/*
* Represents a Ground function.
*/
@@ -119,6 +125,8 @@ typedef struct GroundFunction {
GroundValueType returnType;
GroundProgram program;
size_t startLine;
bool isNative;
NativeGroundFunction nativeFn;
} GroundFunction;