Start work on interpreter

This commit is contained in:
2025-11-23 18:34:30 +11:00
parent 31cc30ee48
commit a69901be7b
7 changed files with 1460 additions and 1 deletions

View File

@@ -82,7 +82,7 @@ GroundValue createIntGroundValue(int64_t in);
// Creates a GroundValue containing (in), with type DOUBLE.
GroundValue createDoubleGroundValue(double in);
;
// Creates a GroundValue containing (in), with type STRING.
GroundValue createStringGroundValue(const char* in);
@@ -95,6 +95,9 @@ GroundValue createBoolGroundValue(bool in);
// If (gv) contains any data stored on the heap, frees it.
void freeGroundValue(GroundValue* gv);
// Prints out a GroundValue.
void printGroundValue(GroundValue* gv);
// Initializes a GroundArg with type VALUE
GroundArg createValueGroundArg(GroundValue value);
@@ -104,6 +107,9 @@ GroundArg createRefGroundArg(GroundArgType type, const char* refname);
// Frees all data stored on the heap in a GroundArg.
void freeGroundArg(GroundArg* ga);
// Prints out a GroundArg.
void printGroundArg(GroundArg* ga);
// Initializes a GroundInstruction, with inst type (type).
GroundInstruction createGroundInstruction(GroundInstType type);
@@ -113,4 +119,7 @@ void freeGroundInstruction(GroundInstruction* gi);
// Adds arg (arg) to the GroundInstruction (gi).
void addArgToInstruction(GroundInstruction* gi, GroundArg arg);
// Prints out a GroundInstruction.
void printGroundInstruction(GroundInstruction* gi);
#endif