bug fixes and getfield implementation beta

This commit is contained in:
2026-07-13 11:49:59 +10:00
parent 6929f055de
commit f2fbeb3a68
11 changed files with 371 additions and 23 deletions

View File

@@ -1,3 +1,13 @@
/**
* @file ground.h
* @brief Defines the interface for the GroundVM.
*
* This header has two main sections: the types, and the interface. The types are the layout of the data that the GroundVM uses, whereas the interface declares all the functions which GroundVM provides for interfacing with Ground programs. The interface resides entirely in the struct _Ground, which has pointers to implementation functions.
*
* @author Maxwell Jeffress
* @date 2026-07-12
*/
#ifndef GROUND_H
#define GROUND_H
@@ -394,10 +404,14 @@ struct _Ground {
bool error;
} Flags;
/**
* @brief Functions to create new instances of Ground-specific types. Use Ground.Free to free when no longer needed.
*/
struct {
// Creates a new value of the specified type.
// Returns a GroundValue
/**
* @brief Creates a new GroundValue, which wraps the underlying value for the VM. Copies the input value.
*/
struct {
GroundValue (*Int) (GroundInt in);
GroundValue (*Double) (GroundDouble in);