forked from ground/cground
Library support in interpreter (docs soon)
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user